springload / draftail

📝🍸 A configurable rich text editor built with Draft.js
https://www.draftail.org/
MIT License
613 stars 64 forks source link

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

Open viperfx opened 3 years ago

viperfx commented 3 years ago

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.

thibaudcolas commented 3 years ago

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.

viperfx commented 3 years ago

Awesome thanks. It's affecting a quite a few users on our side, do you know the last version without this bug?

On Thu., Oct. 29, 2020, 18:42 Thibaud Colas, notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/springload/draftail/issues/426#issuecomment-719065156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQEQNNCAAVRFHBUE5U2ADSNHVU5ANCNFSM4TD3URRA .

viperfx commented 3 years ago

@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.