springload / draftail

📝🍸 A configurable rich text editor built with Draft.js

Home Page:https://www.draftail.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Checkbox plugin: Editing the text on the line, most of the characters get deleted, after checkbox is ticked.

viperfx opened this issue · comments

Describe the bug

When ticking a checkbox after editing the text on the line, most of the characters get deleted.

Go to https://www.draftail.org/docs/plugins

  1. Type a line and press the checkbox icon. (all good and works as expected)
  2. Edit the line quickly, and tick the checkbox
    BUG: Some or most of the characters get deleted on the line.
  3. Edit the line, wait a second or two, and then tick the checkbox.
    BUG: Some or most of the characters get deleted on the line.

Which terms did you search for in the documentation and issue tracker?

I searched checkbox in this tracker and did not find any related items.

(Write your answer here if relevant.)

Environment

v1.3.0 - all browsers, including latest chrome.

Steps to reproduce

Go to https://www.draftail.org/docs/plugins

  1. Type a line and press the checkbox icon. (all good and works as expected)
  2. Edit the line quickly, and tick the checkbox
    BUG: Some or most of the characters get deleted on the line.
  3. Edit the line, wait a second or two, and then tick the checkbox.
    BUG: Some or most of the characters get deleted on the line.

Expected behavior

The characters on the edited line should not be modified. Only the checkbox state should be modified.

Thank you @viperfx, I’ll have a look next week, this definitely used to work and I’m not too sure what might have changed.

@thibaudcolas do you have any suggestions? for a short workaround.

I would really like to avoid this issue happening in production. It's affecting user experience.