facebookarchive/draft-js

Select and drag text in the editor is broken, can recreate this on draftjs.org

Open

#1454 opened on Oct 25, 2017

View on GitHub
 (12 comments) (0 reactions) (0 assignees)JavaScript (22,554 stars) (2,646 forks)batch import
bugchromehelp wantedhigh priority

Description

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

What is the current behavior? Select and drag text in the editor is broken, causes unpredictable behaviour. Can recreate this on draftjs.org Ubuntu: Chromium Version 61.0.3163.100 Firefox Version 56.0 Windows: Chrome

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: **

Go to draftjs.org, enter a sentence into the editor, double click the first word to highlight it and drag it to another location in the editor.

The observed result is near different each time and is not what is expected, sometimes the dragged word remains in the original location and in the drop location, sometimes it is placed a few characters after the drop location.

It is tested at https://draftjs.org/

What is the expected behavior?

Move the selected text to the desired caret position.

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

It is tested at https://draftjs.org/ Version 0.10.1 Version 0.10.4

Contributor guide