facebookarchive/draft-js

Lost position of the cursor when editing

Open

#989 opened on Jan 31, 2017

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

Description

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

What is the current behavior? User already has some text in the text area. He puts cursor with his mouse somewhere and quickly types something, then again quickly puts cursor to other place in the text area and again quickly types something. After these several "puts and types" the place where the cursor is and the place where the typed text appears are not in sync anymore. The cursor is in one place, the text appears in another place of the text area.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. https://youtu.be/RZUzLyvLgnY

What is the expected behavior? Text appears on the same position where the cursor is.

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

Browsers:

  • Chrome 55.0.2883.95 (64-bit) Mac OS Sierra 11.02.12
  • Safari 10.0.2 Mac OS Sierra 11.02.12
  • Firefox 49.0.0 Mac OS Sierra 11.02.12
  • IE 11 WIndows 10
  • EDGE 13 Windows 10

Contributor guide