If a `containerElements` element doesn't exist, focus-trap is confused
See original GitHub issueIf you set containerElements
to [null]
, every tabbable node in the document is reachable. I believe this also happens when one of the container elements is no longer in the DOM.
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (15 by maintainers)
Top Results From Across the Web
New containerElements option doesn't lend itself to React #183
My scenario: I want to limit focus to the child of FocusTrap, and a set of CSS selectors. Here's what my code has...
Read more >ERROR Error: You can't have a focus-trap without at least one ...
I got this error in my Angular code for opening a material design dialog(MDCDialog), but I have no clue at the first glance....
Read more >accessibility | Read the Tea Leaves - Nolan Lawson
As it turns out, this works perfectly for tabbing through elements in the shadow DOM, just like <dialog> ! Unfortunately, it has exactly...
Read more >Focus management with Vue refs - Learn web development
Vue components are written as a combination of JavaScript objects that manage the app's data and an HTML-based template syntax that maps to ......
Read more >Focus trap in a dialog modal and after exiting, focus on the last ...
I have multiple modals with different id's. <div id="#Modal" tabindex="-1" class= active" style="left: Opx;" role="dialog" > <div ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks!
Well, in this scenario, what would you expect to have happen?
Here is the line doing the logic affecting here: https://github.com/focus-trap/focus-trap/blob/master/index.js#L73.
I’m not sure what else you would expect here.