froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.3k stars 675 forks source link

Child nodes of contenteditable="false" elements are editable by drag and drop of text #4241

Open cleathers opened 3 years ago

cleathers commented 3 years ago

Child nodes of contenteditable="false" elements are editable by drag and drop of text

Expected behavior.

Dragging text into an element that's a child of a contenteditable="false" but doesn't have contenteditable defined on it, should not accept the dropped text. Per https://html.spec.whatwg.org/multipage/interaction.html#attr-contenteditable

The contenteditable content attribute is an enumerated attribute whose keywords are the empty string, true, and false. The empty string and the true keyword map to the true state. The false keyword maps to the false state. In addition, there is a third state, the inherit state, which is the missing value default and the invalid value default.

The true state indicates that the element is editable. The inherit state indicates that the element is editable if its parent is. The false state indicates that the element is not editable.

Actual behavior.

Dragging text into an element that's a child of a contenteditable="false" but doesn't have contenteditable defined on it, the child node accept the dropped text.

Steps to reproduce the problem.

https://jsfiddle.net/zc2rnyk6/ Visit the fiddle above, there are two p tags. Both with contenteditable="false" defined. You'll notice that you can drag and drop text into the second p tag that contains a span provided you drop your text into the span area.

Editor version.

v3.2.6

OS.

MacOS 11.3.1

Browser.

Chrome 89

MeghashreeAP commented 2 years ago

Thank you for your feedback. The request has been reported to the product management team for evaluation and consideration for an upcoming release.