Replies: 2 comments
-
I'd love to use this too. I'd like to wrap a sidebar in this component if possible |
Beta Was this translation helpful? Give feedback.
0 replies
-
I too would like to disable focus trapping in modals - My application already uses the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to enable FocusTrap only when a certain condition is true. I see that FocusTrap has a features prop, to which I can pass something like
FocusTrap.features.None
, orFocusTrap.features.All
orFocusTrap.features.TabLock | FocusTrap.features.FocusLock
, etc.I would imagine if I do the following, I should get what I need:
However, it looks like
FocusTrap.features.None
still prevents the user from tabbing outside the FocusTrap component. This seems to happen becausehandleBlur
here does not account for the feature flags.I understand that
FocusTrap
is an undocumented feature/component, so perhaps I am missing something else as well.The main question is - shouldn't the
FocusTrap.features.None
flag disable all focus-trapping functionality?Beta Was this translation helpful? Give feedback.
All reactions