Skip to content

Commit

Permalink
fix: ensure menu keydown logic allows shift+tab to navigate as expect…
Browse files Browse the repository at this point in the history
…ed (#31849)
  • Loading branch information
chrisdholt authored Jun 27, 2024
1 parent c05bfd2 commit 272dafa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix: ensure menu keydown logic allows shift+tab to navigate as expected",
"packageName": "@fluentui/web-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
6 changes: 5 additions & 1 deletion packages/web-components/src/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,11 @@ export class Menu extends FASTElement {
break;
case keyTab:
if (this._open) this.closeMenu();
if (e.shiftKey) this.focusTrigger();
if (e.shiftKey && e.composedPath()[0] !== this._trigger) {
this.focusTrigger();
} else if (e.shiftKey) {
return true;
}
default:
return true;
}
Expand Down

0 comments on commit 272dafa

Please sign in to comment.