JiHong88 / suneditor

Pure javascript based WYSIWYG html editor, with no dependencies.
http://suneditor.com
MIT License
1.76k stars 315 forks source link

Delayed cursor position change after pressing [CTRL+A] followed by [DELETE] #1467

Open adamsarek opened 3 days ago

adamsarek commented 3 days ago

Describe the bug After removing content by pressing [CTRL+A] followed by [DELETE] it has a delay which causes cursor position to go to start of editor even after I already typed some text.

To Reproduce Steps to reproduce the behavior:

  1. Write some text
  2. Select all content by pressing [CTRL+A]
  3. Press [DELETE]
  4. Quickly type some text
  5. Cursor moves to start of editor

Expected behavior If it has to perform some cursor moves it should do them before I can type some text.

Screenshots opozdeny_kurzor_na_zacatku_ctrl_a

Desktop

Release

adamsarek commented 3 days ago

This problem is also visible when holding [DELETE] in empty editor. It creates empty paragraph after some delay. I tried the same thing in Chrome and this whole bug is not present there.

Screenshots delete_delay_in_firefox