Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/expansion): prevent focus from entering the panel while it's animating #28646

Merged
merged 1 commit into from Feb 26, 2024

Conversation

crisbeto
Copy link
Member

Currently the expansion panel prevents focus from entering it using visibility: hidden, but that only works when it's closed. This means that if the user tabs into it while it's animating, they may scroll the content make the component look broken.

These changes resolve the issue by setting inert on the panel content while it's animating. Also cleans up an old workaround for IE.

Fixes #27430.
Fixes #28644.

…it's animating

Currently the expansion panel prevents focus from entering it using `visibility: hidden`, but that only works when it's closed. This means that if the user tabs into it while it's animating, they may scroll the content make the component look broken.

These changes resolve the issue by setting `inert` on the panel content while it's animating. Also cleans up an old workaround for IE.

Fixes angular#27430.
Fixes angular#28644.
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Feb 26, 2024
@crisbeto crisbeto self-assigned this Feb 26, 2024
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Feb 26, 2024
@crisbeto crisbeto merged commit 24eaa2e into angular:main Feb 26, 2024
25 of 28 checks passed
crisbeto added a commit that referenced this pull request Feb 26, 2024
…it's animating (#28646)

Currently the expansion panel prevents focus from entering it using `visibility: hidden`, but that only works when it's closed. This means that if the user tabs into it while it's animating, they may scroll the content make the component look broken.

These changes resolve the issue by setting `inert` on the panel content while it's animating. Also cleans up an old workaround for IE.

Fixes #27430.
Fixes #28644.

(cherry picked from commit 24eaa2e)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
2 participants