Closed spatel49 closed 1 month ago
🤔 Correct, the current return focus logic is not "entering" iframes and/or shadow dom, so cannot properly return element where it belongs. That should not be affected by the version change as return focus always was operating within a single document.
Anyway, tell me how exactly one can reproduce the problem?
This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.
Hey there!
I hope you're doing well. I just wanted to inform you of an issue we're facing with unexpected focus behavior when upgrading our
react-focus-lock
package from2.11.2
to2.9.3
.The problem we’re seeing is that the iframe document unexpectedly scrolls to the top of the page after closing certain modals, because it tries to return focus to the iframe element, and then focuses the header element (the first focusable node in the document). Ideally, it should look through the iframe when it’s determining what the active element is when the focus lock is first set up.