Skip to content

bug(mat-sidenav): focus trapping is too aggressive under certain conditions #21955

Open
@mmalerba

Description

@mmalerba

Reproduction

This issue seems to manifest under the following conditions:

  • Sidenav is open in over or push mode (does not happen in side mode).
  • Backdrop is disabled (this is necessary to be able to click in the content area of a over or push sidenav.
  • App is using the ConfigurableFocusTrap (does not happen with the deprecated FocusTrap).

Steps to reproduce:
https://stackblitz.com/edit/angular-avy29p?file=src%2Fmain.ts

  1. click to focus the "Content" input

Expected Behavior

"Content" input remains focused.

Actual Behavior

"Drawer" input immediately steals focus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GThis is is related to a Google internal issueP2The issue is important to a large percentage of users, with a workaroundarea: material/sidenavregressionThis issue is related to a regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions