draft-js icon indicating copy to clipboard operation
draft-js copied to clipboard

Support for Rendering within a Shadow DOM

Open michaelcox opened this issue 8 years ago • 7 comments

Do you want to request a feature or report a bug?

Request a Feature

What is the current behavior?

Currently the draft editor throws errors at various times when rendered within a shadow dom.

Here is a CodePen I created to simplify the issue. This shows both the errors thrown when mounting, as well as when trying to focus(). https://codepen.io/michael_cox/pen/OmBPBm

More information can be found in this ticket for react-shadow: https://github.com/Wildhoney/ReactShadow/issues/31

A couple things I've found while diving into this:

What is the expected behavior?

Ideally the draft editor can be loaded in a shadow dom with the same functionality as when rendered normally.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?

Testing draft 0.10.1 in Chrome 58, but I assume this is currently unsupported and would be an issue in any version.

michaelcox avatar May 22 '17 14:05 michaelcox

Thanks for reporting this! This is not a priority for Facebook but we are open to pull requests that improve the support for Draft in the shadow dom.

flarnie avatar Jun 15 '17 21:06 flarnie

For now I'm tagging this as a feature request rather than a bug, because we don't support the shadow dom right now.

flarnie avatar Jun 15 '17 21:06 flarnie

@flarnie Hey! This issue was opened more than 3 years ago. Do you know if shadow root support is planning or it is not in top priorities? I guess it won't be a difficult task and some work can be copied from here https://github.com/ianstormtaylor/slate/pull/3749#pullrequestreview-459648387

andrewfan avatar Nov 04 '20 12:11 andrewfan

Hello @flarnie , any update on this topic?

janeksmielowski avatar Aug 23 '21 13:08 janeksmielowski

Hi @flarnie, any updates?

wxin627 avatar Feb 23 '22 07:02 wxin627

Any updates on this one?

adamszeptycki avatar May 02 '22 11:05 adamszeptycki

Joining the "Any updates on this" queue.

MightyPhoenix avatar Oct 14 '22 10:10 MightyPhoenix