-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After closing once and reopening, modal cannot be dismissed #9362
Comments
Sorry, I don't understand what you mean by "when clicks to dismiss for seconds onward". |
Hi. Basically the steps very easy. I just need to write sample html as below: <a data-toggle="modal" href="#myModal" class="btn btn-primary">Launch modal</a>
<div class="modal fade" id="myModal" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Test</h4>
</div>
<div class="modal-body">
Test
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div> When I clicks the "Launch modal" button, the modal will show up, then I clicks "Close" button to close the modal. After the modal has hidden, I clicks the "Launch modal" button again (second times), then clicks "Close" button, the modal will not hide, it is still opening. Then, I compare bootstrap js which from last Thursday and Today version, found out that the following codes on Line 932 might causing issue: this.$element
.removeClass('in')
.attr('aria-hidden', true)
.off('click.dismiss.modal') I need to comment out .off('click.dismiss.modal') to make the close button working again. I am not sure whether it is related to bug fix #9111. Sorry, how to write the code block? Thanks. |
Using triple-backticks. It's explained in the "Comments are parsed with GitHub Flavored Markdown" link in the comment box. I've gone ahead and fixed your comment for ya. |
Confirmed: http://jsfiddle.net/SVXZa/1/ |
Yep. Reverting this commit it works fine. (Sorry for the duplicated issue tho) |
We should add a testcase for this... |
Note: The modal can still be dismissed the 2nd+ times by clicking the backdrop, but the "x" and "Close" buttons indeed don't work. |
Hi,
The code used on last Thursday worked fine. But after updated to latest code on Monday (GMT+8), the modal dialog when clicks to dismiss for seconds onward cannot be close.
I am checking on source code line 932, if I commented out this line then it is working again.
this.$element
.removeClass('in')
.attr('aria-hidden', true)
//.off('click.dismiss.modal')
Am I missing anything...?
Sorry for the grammar. Thanks.
The text was updated successfully, but these errors were encountered: