Skip to content

Commit

Permalink
Fix Menu showing behind Drawer (#3639)
Browse files Browse the repository at this point in the history
Co-authored-by: Fernanda Castillo <[email protected]>❤️
  • Loading branch information
lilyvc authored Jun 26, 2024
1 parent ad6f7b4 commit db527bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/twelve-pets-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@salt-ds/core": patch
---

Fixed Menu showing behind Drawer (#3636).
3 changes: 3 additions & 0 deletions packages/core/src/__tests__/__e2e__/menu/Menu.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ describe("Given a Menu", () => {
cy.findByRole("menu").should("not.exist");
cy.findByRole("button", { name: "Open Menu" }).realClick();
cy.findByRole("menu").should("exist");
// Regression - #3636
cy.get(".saltMenuPanel").should("have.css", "z-index", "1500");

cy.get("@openChangeSpy").should("have.been.calledWith", true);
cy.findByRole("menuitem", { name: "Copy" }).realClick();
cy.on("window:alert", (str) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/menu/MenuPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
overflow-y: auto;
min-width: 10em;
position: relative;
z-index: var(--salt-zIndex-popout);
z-index: var(--salt-zIndex-flyover);
box-shadow: var(--salt-overlayable-shadow-popout);
box-sizing: border-box;
}
Expand Down

0 comments on commit db527bc

Please sign in to comment.