JiHong88 / suneditor

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

Error - Letters that reverse on first writing #1403

Open johnnybaida opened 1 month ago

johnnybaida commented 1 month ago

Describe the bug When writing a word quickly, Suneditor's cursor is placed before the letter, this phenomenon causes the word to be written incorrectly

To Reproduce Steps to reproduce the behavior:

  1. Go to http://suneditor.com/sample/html/options.html
  2. Select checkbox strictMode
  3. Select checkbox Value
  4. Enter the following HTML in the Value textarea: <span style="font-family: &quot;Comic Sans MS&quot;;">il giaguaro</span><p class="test" data-text="test">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mollis porttitor massa, non tincidunt risus porttitor at. Maecenas gravida interdum augue, vitae pellentesque nibh pellentesque et. Donec ac lorem eleifend, congue mauris ut, interdum mi. Aenean blandit odio at nunc semper, non suscipit ligula bibendum. Nam hendrerit sapien id dui accumsan ultricies. Nunc laoreet est non leo tempus, et pellentesque elit varius. Morbi accumsan sit amet ante in vestibulum. Quisque congue ligula erat, nec fringilla ex vulputate non.</p>
  5. Click on the Create button
  6. Click inside the editor, with the focus at the end of the text
  7. Press CTRL+A to select all the text (on Windows)
  8. Type a word as fast as you can (e.g. Hello), you will see that the first letter of the word will be spelled correctly, then the cursor will be moved and the other letters will be written to the left, resulting in the following “elloH” for example.

Expected behavior I would have expected that the cursor would not be repositioned and the written word would have been “Hello

Screenshots screen-recorder.webm

Desktop (please complete the following information):

Kryostatic94 commented 1 week ago

Same problem!