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

Most upvoted 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.