-
Notifications
You must be signed in to change notification settings - Fork 808
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
Disable focus trap & disable tab trap #876
base: master
Are you sure you want to change the base?
Disable focus trap & disable tab trap #876
Conversation
if (instances.length > 0) { | ||
const trapFocus = instances.find(({ props }) => !props.disableFocusTrap); | ||
|
||
if (trapFocus && instances.length > 0) { |
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.
What happens if we open one modal with focus trap disabled and one that's enabled?
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.
Then a focus trap will exist. I thought that is the best way to do it as it gives existing functionality priority over the added functionality. I could add something in the readme to let the user know?
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.
I added a comment in the readme about this
Co-authored-by: Bruno Dias <dias.h.bruno@gmail.com>
Fixes #[issue number].
Changes proposed:
Acceptance Checklist:
CONTRIBUTING.md
.