首次打开后,Bootstrap 3 模式不会关闭 [英] Bootstrap 3 modal doesn't close after first opening
问题描述
我认为这是 Bootstrap 本身的错误,因为即使在演示页面上我也遇到了这个问题.如果您打开模态窗口,内置的关闭按钮第一次起作用,但是如果您关闭模态并重新打开它,则关闭(和 X)按钮不会关闭模态,因此您必须在外部单击关闭它.您可以在 Bootstrap 演示页面上看到这一点:
I'm thinking this is a bug with Bootstrap itself, because I'm encountering this problem even on the demonstration page. If you open the modal window, the built-in close button works the first time, but if you close the modal and re-open it, the close (and X) buttons don't close the modal, so you have to click outside of the box to close it. You can see this on the Bootstrap demonstration page:
http://getbootstrap.com/javascript/#modals
(向下滚动到实时演示"并单击启动演示模式".关闭模式窗口一次,重新打开它,关闭"按钮将不再起作用,直到页面刷新.)
(Scroll down to "live demo" and click "Launch demo modal". Close the modal window once, re-open it, and the "close" button will no longer work until the page is refreshed.)
有没有人找到解决方案,以便每次打开模态时关闭按钮都起作用?
Has anyone found a solution to this so that the close button works each time the modal is opened?
推荐答案
bootstrap 中的这个 bug 似乎是一个热门话题:https://github.com/twbs/bootstrap/issues/9362
This bug in bootstrap seems to be a hot topic: https://github.com/twbs/bootstrap/issues/9362
我将更新我的引导程序,看看是否可行...
I'll be updating my bootstrap and see if that does it...
这篇关于首次打开后,Bootstrap 3 模式不会关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!