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

MenuRenderer, OverflowMenu: Ensure menus work in Modal components #1665

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

felixhabib
Copy link
Contributor

@felixhabib felixhabib commented Dec 9, 2024

Fixes a bug where menus could be obscured when rendered inside a Dialog or Drawer component.

MenuRenderer and Modals are both in separate Braid portals, which are in the same stacking context. Hence, their zIndex values are compared. MenuRenderer previously had a lower zIndex value than Modals, and hence if one was used in a Model it would be stacked incorrectly. As they now have the same zIndex value, the element later in the DOM is stacked above, which works correctly for Menus in and out of Modals.

In this solution, the zIndex value for MenuRenderer is not semantically accurate. This should likely be revisited in the future to address this issue.

@felixhabib felixhabib requested a review from a team as a code owner December 9, 2024 04:56
Copy link

changeset-bot bot commented Dec 9, 2024

🦋 Changeset detected

Latest commit: 14cc92f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
braid-design-system Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@felixhabib felixhabib merged commit f44473a into master Dec 9, 2024
7 checks passed
@felixhabib felixhabib deleted the menurenderer-zindex-fix branch December 9, 2024 05:18
@seek-oss-ci seek-oss-ci mentioned this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants