facebookarchive/draft-js

Mouse dragging all text into non-Draft input throws lots of errors

Open

#1240 opened on Jun 8, 2017

View on GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (22,554 stars) (2,646 forks)batch import
bughelp wanted

Description

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

Bug

What is the current behavior?

If you click and drag all of the text in a DraftJS editor with your mouse out of a DraftJS editor into a non-DraftJS input, it starts throwing a bunch of errors when typing in the DraftJS editor.

Does not happen if you don't select all of the text or if you pull the text into another DraftJS editor.

draftjsbug

https://jsfiddle.net/ew2gfqqj/

What is the expected behavior?

No errors on mouse drag in Chrome. No weird text behavior on IE11.

I also would expect the text being dragged to populate in the other input - it currently does not appear in Chrome, even with partial instead of full text selection (see GIF above).

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

I've tried on 0.9.1 on OS X Chrome and Windows IE 11 and Chrome, as well as 0.10.1 on OS X Chrome and Windows 7 IE 11 and Chrome.

It seems to throw errors in Chrome and lead to weird disappearing / reappearing text behavior in IE11.

Contributor guide