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
Because <Backdrop has a static z index of --p-z-index-10 and <Dialog> has a static z index of --p-z-index-11 it's not possible to cleanly open a modal from within a modal.
Opening a modal within a modal causes the <Backdrop> components to stack on --p-z-index-10 and the <Dialog> components to stack on --p-z-index-11. This causes the background modal to still be interactive.
We seem to have some Modal on Modal workflows in admin that use a <Portal> for the first modal (such as in the Settings modal).
Is this a bug or are modal-in-modal workflows intentionally disabled by these static z-index css rules?
Possible solutions
Could we fix this to make modals stackable or at least allow a z-index override (similar to tooltip and popover)?
Issue summary
Because
<Backdrop
has a static z index of--p-z-index-10
and<Dialog>
has a static z index of--p-z-index-11
it's not possible to cleanly open a modal from within a modal.Opening a modal within a modal causes the
<Backdrop>
components to stack on --p-z-index-10 and the<Dialog>
components to stack on --p-z-index-11. This causes the background modal to still be interactive.We seem to have some Modal on Modal workflows in admin that use a
<Portal>
for the first modal (such as in the Settings modal).Is this a bug or are modal-in-modal workflows intentionally disabled by these static z-index css rules?
Possible solutions
Could we fix this to make modals stackable or at least allow a z-index override (similar to tooltip and popover)?
Expected behavior
I can open a modal from within a modal, the backdrop of the inner modal will cover the outer one and make it non-interactive.
Actual behavior
Gif showing issues when stacking modals
Steps to reproduce the problem
<Modal>
component that has a<Modal>
in itReduced test case
https://codesandbox.io/s/stupefied-cartwright-xhxq3f
Specifications
The text was updated successfully, but these errors were encountered: