facebookarchive/draft-js

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

开放

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

 (12 条评论) (0 个反应) (0 位负责人)JavaScript (2,646 个派生)batch import
bugchromehelp wantedhigh priority

仓库指标

星标
 (22,554 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南