Skip to content

Focus set incorrectly when opening dialog from menu #16215

Closed
@VVKot

Description

@VVKot

Reproduction

x-posting this from #16190:

I am opening dialog with autoFocus = false from one of the options in MatMenu. When the menu closes, it sets focus on itself, away from a dialog. You can check the small demo here:
https://stackblitz.com/edit/angular-d3atgj
https://angular-d3atgj.stackblitz.io/

Expected Behavior

The focus stays on the dialog

Actual Behavior

The focus jumps to the menu trigger

Environment

  • Angular: 8.0.0
  • CDK/Material: 8.0.0
  • Browser(s): Any
  • Operating System (e.g. Windows, macOS, Ubuntu): Any

Metadata

Metadata

Assignees

Labels

AccessibilityThis issue is related to accessibility (a11y)P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions