focus-trap: If a `containerElements` element doesn't exist, focus-trap is confused
If 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.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 22 (15 by maintainers)
Commits related to this issue
- WIP: Investigating issue 223 Fixes #223 -- maybe... So far, can't reproduce the issue. — committed to focus-trap/focus-trap by stefcameron 4 years ago
- WIP: Investigating issue 223 Fixes #223 -- maybe... So far, can't reproduce the issue. — committed to focus-trap/focus-trap by stefcameron 4 years ago
- Fixes #223 and adds an exception thrown if the trap is allowed to get into a state where none of its containers contain any tabbable nodes (there must always be at least one container that has at leas... — committed to focus-trap/focus-trap by stefcameron 4 years ago
- Allow trap containers to have no tabbable nodes (#237) Fixes #223 and adds an exception thrown if the trap is allowed to get into a state where none of its containers contain any tabbable nodes (ther... — committed to focus-trap/focus-trap by stefcameron 4 years ago
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.