-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
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
Opening a modal window twice makes it impossible to close it again. #24117
Comments
Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via JS Bin or CodePen and report back with your link, Bootstrap version, and specific browser and OS details. |
https://jsbin.com/comugudafu/edit?html,output I'm using Bootstrap 4.0.0-beta on Chrome 60.0.3112.113 and Windows 10. |
I'm a bit confused by this: What would be the use case where you would open a modal from itself? Are you expecting the DOM to clone the modal and create another instance? Bootstrap has long had a rule against multiple modals, so I am not sure if this is really an issue. |
I don't see the use case here either. @bjornstenfeldt: can you elaborate? |
I don't want to open 2 modals. But I "extended" the modal so I could open it with a hash change event. I did that because I think it is more user-friendly on mobile devices, when you can close a modal by clicking back. At the same time I needed it to open in a callback from a LinkedIn API call, so I ended up having 2 completely separated .modal('open') calls. |
OK, sounds like a fair use case. We have #24240 open, it lacks a unit test though. |
Opening a modal window twice makes it impossible to close it again.
So if you open the modal window #modal and then execute $("#modal").modal("show"); in the browser console, it is no longer possible to close the modal window.
I'm using Bootstrap 4.0.0-beta on Chrome 60.0.3112.113.
The text was updated successfully, but these errors were encountered: