facebookarchive/draft-js

Support for Rendering within a Shadow DOM

Open

#1 220 ouverte le 22 mai 2017

Voir sur GitHub
 (7 commentaires) (4 réactions) (0 assignés)JavaScript (2 646 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (22 554 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur