-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/sidenav
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Focus trap should not be enabled in MatSidenav when its mode=side. However, if there is another MatSidenav with mode=over or mode=push in the same MatSidenavContainer, focus trap is enabled. The stackblitz example provided comes from a example in the official documentation with changes that just include two buttons and change the mode of the second MatSidenav.
Reproduction
StackBlitz link
Steps to reproduce:
- Click in the button inside the sidenav
- Tab to try to get to the button outside the sidenav
Expected Behavior
The focus should move to the button outside of the sidenav
Actual Behavior
The focus remains on the button inside the sidenav
Environment
- Angular: 21.0.0
- CDK/Material: 21.0.0
- Browser(s): Chrome 143.0.7499.193
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/sidenav