Skip to content
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

.modal-open is not applied to body when "switching" to another modal #11865

Closed
dvdchr opened this issue Dec 13, 2013 · 2 comments
Closed

.modal-open is not applied to body when "switching" to another modal #11865

dvdchr opened this issue Dec 13, 2013 · 2 comments

Comments

@dvdchr
Copy link

dvdchr commented Dec 13, 2013

"switching" means I have an element inside a modal with attributes like this:

data-dismiss="modal" data-toggle="modal" data-target="#anotherModal"

Upon closer look, it seems that show.bs.modal is fired before hidden.bs.modal, which basically adds another .modal-open class to body (therefore does nothing), and then removes the class; ultimately leaving the body with no .modal-open class.

Here is an example: http://jsbin.com/iDovaBup/1/

(I'm not sure if this "switching" is allowed, though.)

@cvrebert
Copy link
Collaborator

I'm doubtful we'll support that.
One alternative is for you to have only one "true" modal, and then swap in the content of the other "modal" in a button click event handler. (The animation is arguably unnecessary.)

@mdo
Copy link
Member

mdo commented Dec 14, 2013

Yup, we won't be supporting multiple modals.

@mdo mdo closed this as completed Dec 14, 2013
@twbs twbs locked and limited conversation to collaborators Feb 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants