Skip to content

Conversation

@crisbeto
Copy link
Member

In #27355 the sidenav was changed to trap focus if the container has a backdrop. This can be incorrect, because the sidenav that's causing the backdrop to be shown might not be open.

These changes switch to enabling focus trapping if the backdrop is actually visible.

Fixes #32661.

In angular#27355 the sidenav was changed to trap focus if the container has a backdrop. This can be incorrect, because the sidenav that's causing the backdrop to be shown might not be open.

These changes switch to enabling focus trapping if the backdrop is actually visible.

Fixes angular#32661.
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jan 25, 2026
@pullapprove pullapprove bot requested review from andrewseguin and ok7sai January 25, 2026 08:30
@adolgachev adolgachev self-requested a review January 26, 2026 17:16
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jan 27, 2026
@crisbeto crisbeto merged commit c70a473 into angular:main Jan 27, 2026
29 of 31 checks passed
@crisbeto
Copy link
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

crisbeto added a commit that referenced this pull request Jan 27, 2026
In #27355 the sidenav was changed to trap focus if the container has a backdrop. This can be incorrect, because the sidenav that's causing the backdrop to be shown might not be open.

These changes switch to enabling focus trapping if the backdrop is actually visible.

Fixes #32661.

(cherry picked from commit c70a473)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: material/sidenav target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(sidenav): Focus trap is enabled with mode=side if there is another sidenav with mode=over or mode=push

2 participants