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

[Bug]: tldraw.com iframe embed steals focus on load #1864

Open
1 task done
josephrocca opened this issue Sep 13, 2023 · 0 comments
Open
1 task done

[Bug]: tldraw.com iframe embed steals focus on load #1864

josephrocca opened this issue Sep 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@josephrocca
Copy link

josephrocca commented Sep 13, 2023

What happened?

When I embed a tldraw.com canvas (e.g. in a web page, notion doc, etc.), it steals focus when the iframe loads, which causes the page to scroll down to the iframe embed, and also takes focus from e.g. a text area that the user is typing in.

I'm not sure if this is expected behavior. If it is, I should have posted this as a feature request - i.e. a URL hash parameter to disable this "auto-focus on load" behavior.

How can we reproduce the bug?

Just load this page: https://jsbin.com/mobozisali/edit?html,output

Notice that it scrolls all the way to the bottom of the page when the iframe loads.

You can also try typing in the code editor, and notice that it steals focus as you type.

What browsers are you seeing the problem on?

Firefox, Chrome

Contact Details

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant