-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
bug(expansion): expansion panel breaks when quickly closing panels using keyboard commands #27430
Comments
Hello, I'd like to know if someone is currently engaged with this task. If not, I'm ready to take a shot at it and work on the solution, pending your consent. Thank you! |
…imation This commit addresses an issue where mat-expansion-panels were breaking when a user attempted to quickly close and tab away from a panel after closing it. The issue occurred because the tab key was being pressed between the collapsing animation, causing the panel body to remain visible and receive focus. To resolve this, we manually set the panel's visibility to hidden when the tab key is pressed during the collapsing animation. This ensures that the next element in the tab order receives focus as expected. Fixes angular#27430.
This commit addresses an issue where mat-expansion-panels were breaking when a user attempted to quickly close and tab away from a panel after closing it. The issue occurred because the tab key was being pressed between the collapsing animation, causing the panel body to remain visible and receive focus. To resolve this, we manually set the panel's visibility to hidden when the tab key is pressed during the collapsing animation. This ensures that the next element in the tab order receives focus as expected. Fixes angular#27430.
…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.
…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.
…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.
…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.
…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)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When a mat-expansion-panel has tabbable elements in it's panel content, the mat-expansion-panel will break if a user attempts to quickly close and tab away from a panel after closing (easily reproduced using space + tab)
Reproduction
StackBlitz link: https://stackblitz.com/edit/dgbfpa-3pq8m8?file=src%2Fexample%2Fexpansion-overview-example.html
Steps to reproduce:
Expected Behavior
You successfully close the expansion panels
Actual Behavior
The expansion panels are closed but in a broken state
Environment
16.1.1
16.1.4
Chrome
macOs
The text was updated successfully, but these errors were encountered: