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

[docs] z-index added in popper when used by split button #33763

Merged
merged 2 commits into from Aug 4, 2022
Merged

[docs] z-index added in popper when used by split button #33763

merged 2 commits into from Aug 4, 2022

Conversation

PunitSoniME
Copy link
Contributor

@PunitSoniME PunitSoniME commented Aug 2, 2022

resolves #33762

@mui-bot
Copy link

mui-bot commented Aug 2, 2022

No bundle size changes

Generated by 🚫 dangerJS against c94db28

@PunitSoniME
Copy link
Contributor Author

@siriwatknp

Can you review this PR please ?

Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for fixing it!

@siriwatknp siriwatknp merged commit 68dcf72 into mui:master Aug 4, 2022
@siriwatknp
Copy link
Member

This is good enough to fix the docs. In v6, we can consider adding z-index to Material UI popper. #33762 (comment)

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 4, 2022

In this case of the demo, it seems that the stacking order is wrong because there is another element in the DOM order after that also has a position: relative. So I assume that we have 3 options, either we remove the position: relative or we remove disablePortal, or we add the zIndex.

I'm not sure why the position: relative; was added in https://github.com/mui/material-ui/blame/c1ea008e7d747b633c048c1ed967a0f930129f54/src/internal/ButtonBase.js#L15.

@PunitSoniME
Copy link
Contributor Author

PunitSoniME commented Aug 4, 2022

Hi @oliviertassinari

Popper has z-index issue, similar kind of issue reported #33730 as well.

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 4, 2022

@PunitSoniME Yeah, I guess there are multiple possible opportunities behind this:

  1. Remove a position relative in the button? If we do, then maybe revert this PR
  2. Maybe add a z-index: 1 on the Popper. Hopping we won't have to revert it like [Skeleton] Fix z-index elevation issue #20803. If we do, then maybe revert this PR

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work docs Improvements or additions to the documentation labels Aug 4, 2022
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Split button with popper z-index issue
4 participants