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

Browser (chrome) already creates a shadow DOM for input and textarea #12

Open
danigrosu opened this issue Apr 27, 2018 · 1 comment
Open

Comments

@danigrosu
Copy link

This approach won't work any more since modern browsers (I have tested it with chrome) don't let you create additional shadow-root to input/textarea. More info here.

It works in Gmail for <div role="textbox"></div>, but after you press a key, the delegate loses its focus. Any idea why?

@wh0
Copy link
Member

wh0 commented Apr 30, 2018

About the Gmail issue, I don't know why. Roughly, we put a focus listener on the original node that focuses the delegate. Maybe Gmail is doing something to focus a different node or to prevent or cancel the focus event.

I hear that a lot of modern rich text editors like Quill and ProseMirror are moving away from contenteditable, and we haven't looked into whether there's a systematic way to detect them.

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

2 participants