Replies: 1 comment
-
z-index overlay order is subject to the stacking context. Combining this knowledge with the parent node prop(s) (https://reactcommunity.org/react-modal/#custom-parent), you can ensure that the modal gets rendered in a sufficiently high stacking context and will always be on top. The simplest case is having the parent be appended to the document body, where it has a stacking context and positioned over its siblings (the preceding body children). Whatever stacking context then happens in a child is irrelevant, because the modal parent is positioned above all that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking for a solution that will enable me passing the context of the modal into it from any component in the app and it would still be rendered at the highest z-index. Does this solution work like that? all the examples I have seen show local triggering of the modal so local z-index/div order will apply. If so, could you provide a link to example or docs? thx.
Beta Was this translation helpful? Give feedback.
All reactions