You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an situation where I need to nest modals (I know... nested modals 😱).
In my app, showing the second modal works fine, and it closes properly. However, once it is closed, the first modal won't close.
I found this codepen someone created, which demonstrates this should be possible: https://codepen.io/badfeather/pen/NWbBbYP So I was very confused why it didn't work in my app.
I have an situation where I need to nest modals (I know... nested modals 😱).
In my app, showing the second modal works fine, and it closes properly. However, once it is closed, the first modal won't close.
I found this codepen someone created, which demonstrates this should be possible: https://codepen.io/badfeather/pen/NWbBbYP So I was very confused why it didn't work in my app.
After a bunch of digging, I think I figured out what is happening. In that codepen, the open/close functionality is controlled via the built-in closeTrigger functionality. In my case, I am doing it via
MicroModal.close
. In devtools, I can see that the event listener is removed from the first modal. I believe it is caused by this line: https://github.com/HongPong/Micromodal/blob/35723741398857305c85bba52fd431cd0f88e8c1/lib/src/index.js#L313I'm about to try to push back on my designers to see if I can get rid of the nested modal, but I figured I'd report the issue here.
The text was updated successfully, but these errors were encountered: