facebookarchive/draft-js

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

Open

#1454 aperta il 25 ott 2017

Vedi su GitHub
 (12 commenti) (0 reazioni) (0 assegnatari)JavaScript (2646 fork)batch import
bugchromehelp wantedhigh priority

Metriche repository

Star
 (22.554 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor