design-system-react
design-system-react copied to clipboard
Overlay affects Modal's z-index and makes it render under other elements
<div class ='ReactModal__Overlay' /> is an ancestor of Modal and defines its stacking context
(for explanation of stacking contexts, read http://philipwalton.com/articles/what-no-one-told-you-about-z-index/)
Overlay has position:fixed and z-index:0, which means the effective z-index of Modal is 0.
Note that .slds-modal has z-index:9001, but it doesn't have any effect.
Lightning Dashboards have many positioned elements with z-index 1 or 2. Fore example, our canvas has position:absolute and z-index:1.
This causes canvases and other elements to render above the Modal. This is a regression.
Workarounds:
- set overlay's
z-indexto at least 2 - unset overlay's
position(i.e. let it bestatic)