design-system-react icon indicating copy to clipboard operation
design-system-react copied to clipboard

Overlay affects Modal's z-index and makes it render under other elements

Open minevskiy opened this issue 10 years ago • 0 comments

<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-index to at least 2
  • unset overlay's position (i.e. let it be static)

minevskiy avatar Mar 08 '16 21:03 minevskiy