facebookarchive/draft-js

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

Open

#1,454 创建于 2017年10月25日

在 GitHub 查看
 (12 评论) (0 反应) (0 负责人)JavaScript (22,554 star) (2,646 fork)batch import
bugchromehelp wantedhigh priority

描述

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

贡献者指南

Select and drag text in the editor is broken, can recreate this on draftjs.org · facebookarchive/draft-js#1454 | Good First Issue