-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Do you want to request a feature or report a bug?
Bug. Initially reported at wagtail/wagtail#4343. Underlying Draft.js issue: facebookarchive/draft-js#1240.
What is the current behavior?
Draftail does not support text drag-and-drop to non-Draftail fields (input, textarea).
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. GIFs and screenshots are very helpful too.
- In an empty Draftail field, type one paragraphs
- Select the paragraph
- Drag-and-drop the selection in another non-Draftail field
- Type in the Draftail field will raise JS errors, and any other interaction will fail.
- Eventually with the right interaction the whole editor crashes and stops rendering.
What is the expected behavior?
Text drag-and-drop should work as expected, inserting the dragged text where the caret is. Or if that's not possible, the editor should at least not crash.
Which versions of Draftail + Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draftail or Draft.js?
All versions, all browsers.
This can easily be tested with the fields at the end of https://demo.draftail.org/storybook/?path=/story/tests--copy-paste.
For a solution, I'm not entirely sure which approach would be best. See facebookarchive/draft-js#1240 (comment) for further details. Any help / feedback is very welcome!