Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FocusLock should have cross-frame behavior controllable #104

Closed
theKashey opened this issue Apr 17, 2020 · 3 comments
Closed

FocusLock should have cross-frame behavior controllable #104

theKashey opened this issue Apr 17, 2020 · 3 comments

Comments

@theKashey
Copy link
Owner

reach/reach-ui#536

I am adding new crossFrame option, right now defaults to true, as long as this behaviour might introduce a breaking change for someone.

setting crossFrame=true will work "as today". Focus will try to keep focus
setting crossFrame=false will work "as proposed". Iframes would be treated as "pages", and let you move focus outside.
I am not sure which behaviour is actually correct - iframes are usually a part of a page, a part of your product, and the only exemptions are non-production examples like code-sandbox.

@moodysalem
Copy link

IMO the default should be false, as it's surprising this behavior is even possible in the browser

@yevhenii-username
Copy link

yevhenii-username commented May 27, 2022

I think this crossFrame option must be described in the documentation.
I faced this issue when tried to use https://github.com/vector-im/element-web inside an iframe and when their modal is open and all my inputs lose focus on the main page.

@yevhenii-username
Copy link

yevhenii-username commented May 27, 2022

Updated readme with crossFrame prop - #220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants