Repository navigation
fix: restore menu list keyboard navigation after reconnect - #36871
Paul Mardling (PaulGMardling) merged 3 commits into
Conversation
|
@microsoft-github-policy-service agree |
|
aseeb shibin (@asxxb) Please run |
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
Hi! I've added the required Beachball change file and pushed the update. The |
c970609 to
5a54f76
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the fix for menu-list arrow-key navigation after DOM removal and reinsertion.
No open issues 🎉
What changed in this PR
Fixes #36869 by restoring fluent-menu-list arrow-key navigation after DOM removal and reinsertion, addressing the reported Firefox and Safari behavior.
Changes:
- Clears the disconnected
FocusGroupreference so it can be recreated on reconnect. - Adds a regression test for arrow-key navigation after moving the menu list.
- Adds a patch release change file for
@fluentui/web-components.
| File | Description |
|---|---|
packages/web-components/src/menu-list/menu-list.ts |
Clears the focus group reference during disconnection. |
packages/web-components/src/menu-list/menu-list.spec.ts |
Tests arrow-key navigation after a DOM move. |
change/@fluentui-web-components-0c22cad8-1535-4970-b928-3554886f412f.json |
Records the fix for a patch release. |
Review effort: Balanced
1047057
into
microsoft:master
Previous Behavior
When a
fluent-menu-listelement was removed from the DOM and reinserted, itsFocusGroupinstance remained referenced after being disconnected. As a result, arrow-key navigation could stop working in Firefox and Safari.New Behavior
Clear the existing
FocusGroupreference whenMenuListdisconnects, allowing a new instance to be created when the element reconnects.Add a regression test to verify that arrow-key navigation continues working after the menu list is moved in the DOM.
Related Issue(s)