Skip to content

fix(aria/menu): submenu collapsing when content inside it changes - #33977

Open
lazerg wants to merge 1 commit into
angular:mainfrom
lazerg:fix/issue-33976-menu-focus-mutation
Open

lazerg wants to merge 1 commit into
angular:mainfrom
lazerg:fix/issue-33976-menu-focus-mutation

Conversation

@lazerg

@lazerg lazerg commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Any DOM change inside a menu bumps the SortedCollection version, which always produced a new orderedItems array even when no item moved. That re-ran the menu's focus effect, so a parent menu pulled focus back to its active item and closed the open submenu. orderedItems now only emits when the items or their order actually change.

Fixes #33976

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(aria/menu): any DOM change inside an open submenu moves focus up and collapses it

1 participant