Skip to content

fix(material/sidenav): more robust reset logic for inert attribute#33257

Merged
crisbeto merged 1 commit into
angular:mainfrom
crisbeto:drawer-inert-fix
May 14, 2026
Merged

fix(material/sidenav): more robust reset logic for inert attribute#33257
crisbeto merged 1 commit into
angular:mainfrom
crisbeto:drawer-inert-fix

Conversation

@crisbeto
Copy link
Copy Markdown
Member

In #33247 I added some logic to mark the drawer content as inert while it's closed. That logic is too brittle and it seems to fail to reset the attribute if the user calls close from the backdropClick callback.

These changes switch to a more robust approach where we have have the reset logic in a single place and we always execute it, rather than trying to do it right when focus is moved in/out of the sidenav.

In angular#33247 I added some logic to mark the drawer content as `inert` while it's closed. That logic is too brittle and it seems to fail to reset the attribute if the user calls `close` from the `backdropClick` callback.

These changes switch to a more robust approach where we have have the reset logic in a single place and we always execute it, rather than trying to do it right when focus is moved in/out of the sidenav.
@crisbeto crisbeto requested a review from ok7sai May 14, 2026 07:02
@crisbeto crisbeto added G This is is related to a Google internal issue target: rc This PR is targeted for the next release-candidate labels May 14, 2026
@pullapprove pullapprove Bot requested a review from wagnermaciel May 14, 2026 07:02
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 14, 2026
@crisbeto crisbeto merged commit a4e2b32 into angular:main May 14, 2026
32 of 34 checks passed
@crisbeto
Copy link
Copy Markdown
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 May 14, 2026
…33257)

In #33247 I added some logic to mark the drawer content as `inert` while it's closed. That logic is too brittle and it seems to fail to reset the attribute if the user calls `close` from the `backdropClick` callback.

These changes switch to a more robust approach where we have have the reset logic in a single place and we always execute it, rather than trying to do it right when focus is moved in/out of the sidenav.

(cherry picked from commit a4e2b32)
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 G This is is related to a Google internal issue target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants