-
Notifications
You must be signed in to change notification settings - Fork 142
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(Tearsheet): avoid focus traps with stacked tearsheets #1360
Conversation
✔️ Deploy Preview for ibm-cloud-cognitive ready! 🔨 Explore the source changes: 36fd7e4 🔍 Inspect the deploy log: https://app.netlify.com/sites/ibm-cloud-cognitive/deploys/617dd73d2b73ba00088521c4 😎 Browse the preview: https://deploy-preview-1360--ibm-cloud-cognitive.netlify.app |
@matthewgallo @lee-chase I looked at the approach to this that replaced the ComposedModal with plain Fortunately I found this alternative, which uses a rather obscure prop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad you found a work around for this! 🥇
Closes #1332
This PR:
This should avoid the focus trap issue and also clean up the handling of focus when multiple tearsheets are being opened and closed.
What did you change?
Tearsheet.js, also added to the stacked tearsheet stories so the issue can be verified. Also updated the tests to expect warnings from Carbon -- these should eventually be removed (see carbon-design-system/carbon#10000).
How did you test and verify your work?
Ran storybook.