Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backdrop] Comment on z-index use case #18589

Merged
merged 2 commits into from
Nov 28, 2019

Conversation

miketdonahue
Copy link
Contributor

@miketdonahue miketdonahue commented Nov 27, 2019

It seems very strange to me that you would want the zIndex of the Backdrop to be -1. I would think the backdrop zIndex should be 1 so it overrides any normally positioned or fixed positioned element on the page. I am seeing strange issues with the default backdrop where some elements on the page (also MUI components, like Paper) are shown above it.

The -1 seems to be the culprit.

If you aren't going to change to 1, can someone explain why -1 is desirable?

Thanks.

It seems very strange to me that you would want the zIndex of the Backdrop to be -1. I would think the backdrop zIndex should be 1 so it overrides any normally positioned or fixed positioned element on the page. I am seeing strange issues with the default backdrop where some elements on the page (also MUI components) are shown above it.

The -1 seems to be the culprit.

If you aren't going to change to 1, can someone explain why -1 is desirable?

Thanks.
@mui-pr-bot
Copy link

mui-pr-bot commented Nov 27, 2019

No bundle size changes comparing 7a329c5...a33a42d

Generated by 🚫 dangerJS against a33a42d

@oliviertassinari
Copy link
Member

@meebix Do you have a codesandbox we can have a look at?

@oliviertassinari oliviertassinari changed the title Update Backdrop zIndex to 1 [Backdrop] Fix z-index logic Nov 27, 2019
@oliviertassinari oliviertassinari added component: backdrop This is the name of the generic UI component, not the React module! waiting for user information labels Nov 27, 2019
@oliviertassinari
Copy link
Member

For context, the z-index: -1 is important for dialog body scroll support.

@oliviertassinari oliviertassinari changed the title [Backdrop] Fix z-index logic [Backdrop] Comment on z-index use case Nov 28, 2019
@oliviertassinari oliviertassinari merged commit a5f4a4d into mui:master Nov 28, 2019
@oliviertassinari
Copy link
Member

Happy to follow up on this topic is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: backdrop This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants