Calling MatMenuItem#focus() does not update the MatMenu's focusKeyManager's active item #17761
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Reproduction
Repro: https://stackblitz.com/edit/components-issue-svmexm
Steps to reproduce:
focus
method.)Expected Behavior
What behavior were you expecting to see?
The next mat-list-item, "D", should be focused.
Actual Behavior
What behavior did you actually see?
The second mat-list-item, "B", is focused.
Analysis
This is happening because the mat menu's FocusKeyManager still thinks the first mat menu item is the active item, even thought we programatically focused a different mat-menu-item. Since mat menu's key manager is private / not exposed to downstream developers, I don't think there's a way to address it currently without a change to Angular Material.
Some possible solutions
Environment
The text was updated successfully, but these errors were encountered: