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

Focus trap is not working after changing blocking #248

Open
marekjedrzejewski opened this issue Feb 2, 2023 · 0 comments
Open

Focus trap is not working after changing blocking #248

marekjedrzejewski opened this issue Feb 2, 2023 · 0 comments

Comments

@marekjedrzejewski
Copy link

Hello, I'm working on project which has dialogs fired from inside the bottom sheet, but it's not something that I can use sibling for as it's rendered based on context in totally different place of the app.

I'm relying on blocking prop - I thought I could set it dynamically based on dialog being opened or not, so dialog would have its own focus trap, and after it's closed, blocking in set back to true and focus trap is back to bottom sheet. Unfortunately, focus trap works only initially, after blocking is set to false, and then back to true focus trap is lost. I prepared code sandbox which shows the issue:

https://codesandbox.io/s/late-firefly-fvyfgu?file=/src/App.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant