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

[composer] tabbing through to body doesn't work in firefox #460

Conversation

gudsson
Copy link
Contributor

@gudsson gudsson commented Oct 5, 2022

Issues:

The following issues were identified with the Composer component in Firefox, and seem to be known issues with the Firefox's Selection API implementation with contenteditable elements in the Shadow DOM.

  • Focusing non-body elements directly prior to focusing the HTML editor prevents cursor from displaying.
  • Focusing non-body elements which store selection caret/range prior to focusing the HTML editor prevents selection caret from switching to the HTML editor.
    • The selection caret seems to get trapped in <input> elements and prevents typing into the HTML editor unless document.activeElement is updated by clicking on the background/body.

What you did:

Screen Captures

Lost cursor and typing lockout on tab-through

broken

Re-focus solution

fixed

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@gudsson gudsson marked this pull request as draft October 5, 2022 03:34
@vercel
Copy link

vercel bot commented Oct 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
components ✅ Ready (Inspect) Visit Preview Oct 11, 2022 at 5:52AM (UTC)

@gudsson gudsson force-pushed the TW-154-composer-bug-tabbing-through-to-body-and-typing-does-not-work-in-firefox branch from 6c08295 to 553283f Compare October 7, 2022 19:34
add back old comment
Copy link
Contributor

@yifanplanet yifanplanet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇 Thank you for solving this!

@gudsson gudsson merged commit 958e0ce into main Oct 12, 2022
@gudsson gudsson deleted the TW-154-composer-bug-tabbing-through-to-body-and-typing-does-not-work-in-firefox branch October 12, 2022 05:28
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

Successfully merging this pull request may close these issues.

2 participants