Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Multiple Modals and Backdrop #2678

Open
Exagram opened this issue Sep 9, 2014 · 6 comments
Open

Multiple Modals and Backdrop #2678

Exagram opened this issue Sep 9, 2014 · 6 comments

Comments

@Exagram
Copy link

Exagram commented Sep 9, 2014

If I open a modal within a modal, a new backdrop doesn't instantiate for the second modal. Does Angular UI support this use case? If not, is there an option to move the backdrop to the highest modal?

@davidwparker
Copy link

Everything that I've seen is that they re-use the backdrop when possible. This is convenient for not creating objects, but not convenient for doing things with different backdrop styles...

@Exagram
Copy link
Author

Exagram commented Sep 12, 2014

I'm not trying to use different backdrop styles, I'm trying to make sure that "a" or "the" backdrop is under the top-most modal. This doesn't happen if you open a modal on a modal.

Example:
D | D | bD
or
D | bD | bD
Where b=backdrop, D=dialog

@borislit
Copy link

borislit commented Apr 8, 2015

+1
In my case, I have closed one modal (lets call it Modal A) and immedialtly opened another one (lets call it Modal B). Modal A has a backdropClass defined for it.
When modal B is opened, the backdropClass is not removed.

@karianna
Copy link
Contributor

karianna commented Apr 8, 2015

plunkr to demonstrate please

@borislit
Copy link

borislit commented Apr 8, 2015

http://plnkr.co/edit/KCBVGVzirLlApozRrbjl

The flow is as follows: Once you open the first modal, clicking OK will close it and will open the second one right away.
Notice that the first modal adds a "custom-backdrop" class which is not removed when the second modal opens.

@rosskukulinski
Copy link

So we've run into this as well. I'm still poking around, but it seems that there's a race condition from closing the first modal (and removing its backdrop) and setting the backdrop of the second modal.

Specifically, I'm seeing that backdropDomEl is non-null right here, which means that the second modal does not get its backdrop applied.

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

5 participants