diff --git a/change/@microsoft-fast-components-7253ee5c-f527-43d3-a800-4e3bee4d3030.json b/change/@microsoft-fast-components-7253ee5c-f527-43d3-a800-4e3bee4d3030.json new file mode 100644 index 00000000000..088fe9f77d1 --- /dev/null +++ b/change/@microsoft-fast-components-7253ee5c-f527-43d3-a800-4e3bee4d3030.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: incorrect z-index in fast-menu slot=\"submenu\"", + "packageName": "@microsoft/fast-components", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/fast-components/src/menu-item/menu-item.styles.ts b/packages/web-components/fast-components/src/menu-item/menu-item.styles.ts index 872f7e6bc02..07b72e3f6f0 100644 --- a/packages/web-components/fast-components/src/menu-item/menu-item.styles.ts +++ b/packages/web-components/fast-components/src/menu-item/menu-item.styles.ts @@ -60,6 +60,11 @@ export const menuItemStyles: ( border: calc(${focusStrokeWidth} * 1px) solid transparent; } + :host(:hover) { + position: relative; + z-index: 1; + } + :host(.indent-0) { grid-template-columns: auto 1fr minmax(42px, auto); } diff --git a/packages/web-components/fast-components/src/menu/fixtures/menu.html b/packages/web-components/fast-components/src/menu/fixtures/menu.html index 949264ba8d0..e82c93372d6 100644 --- a/packages/web-components/fast-components/src/menu/fixtures/menu.html +++ b/packages/web-components/fast-components/src/menu/fixtures/menu.html @@ -308,3 +308,98 @@

With radio buttons and checkboxes

+ +

Z-index handling

+ +
+ + Menu item 1 + Menu item 2 + Menu item 3 + + Menu item 4 +
+ Shortcut text +
+
+ + Menu item 5 + + Nested Menu item 1.1 + Nested Menu item 1.2 + Nested Menu item 1.3 + + + + Menu item 6 +
+ Shortcut text +
+ + Nested Menu item 1.1 + Nested Menu item 1.2 + Nested Menu item 1.3 + +
+
+ + Menu item 1 + Menu item 2 + Menu item 3 + + Menu item 4 +
+ Shortcut text +
+
+ + Menu item 5 + + Nested Menu item 1.1 + Nested Menu item 1.2 + Nested Menu item 1.3 + + + + Menu item 6 +
+ Shortcut text +
+ + Nested Menu item 1.1 + Nested Menu item 1.2 + Nested Menu item 1.3 + +
+
+
Test div
+