Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text drag-and-drop in a non-Draftail field breaks the editor #194

Open
thibaudcolas opened this issue Apr 25, 2019 · 0 comments
Open

Text drag-and-drop in a non-Draftail field breaks the editor #194

thibaudcolas opened this issue Apr 25, 2019 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@thibaudcolas
Copy link
Collaborator

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant