Focus drops to body if a menu item is removed while focused
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
It should be possible to use the MatMenuTrigger.menuOpened
event to load new menu data when a menu is opened.
What is the current behavior?
If menu data changes after Mat-Menu is opened the menu loses focus and the user can’t navigate the menu with arrow keys unless they tab back to the menu.
What are the steps to reproduce?
https://stackblitz.com/edit/mat-menu-on-open-update-issue
What is the use-case or motivation for changing an existing behavior?
Sometimes it is desirable to load menu data only when the user clicks the menu to avoid unnecessary network requests. Doing this should not break accessibility.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material: 7.0.3 Angular: 7.0.3
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Focus controlled dropdown menu closes when children are ...
Currently, everything works fine unless you focus on an element inside the menu, thus causing it to close because of the trigger element...
Read more >Focus on accessibility – accessible menus and modals - Kahoot
Focus iterates through the next elements on the web-page, in this case elements on our webpage hidden behind the navigation menu. In the...
Read more >Can't Focus? You Might Have One of These Psychological ...
Can't focus? You might have a psychological health condition that can be helped with counselling or psychotherapy.
Read more >Eye drops used in an eye examination - Look After Your Eyes
The drops allow the optometrist to obtain a more accurate reading of the focusing power of your child's eyes by stopping them focusing...
Read more >Post-Gastrectomy Syndrome: Symptoms, Causes, Tests and ...
Learn about out Post-Gastrectomy Syndrome, a side-effect from gastrectomy surgery, from the Cleveland Clinic, including symptoms and treatment options.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any ideas when this fix will be merged in? Or a workaround to use in the meantime?
Still experiencing this issue, has it been resolved?