question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Focus drops to body if a menu item is removed while focused

See original GitHub issue

Bug, 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
tketroncommented, Feb 27, 2019

Any ideas when this fix will be merged in? Or a workaround to use in the meantime?

1reaction
kasperlaugecommented, May 10, 2019

Still experiencing this issue, has it been resolved?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found