sunblaze-ucb/shadowcrypt

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

danigrosu opened this issue · 1 comments

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 commented

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.