wysiwyg-editor icon indicating copy to clipboard operation
wysiwyg-editor copied to clipboard

Cursor jump when white space text is substituted by a linebreak

Open vieiramatheus opened this issue 2 years ago • 3 comments

Expected behavior.

Don't jump cursor unless I actively command it.

Actual behavior.

Cursor is jumping to previous editing when press enter, backspace or delete key.

Steps to reproduce the problem.

0 - Write a pretty standard utilization of Froala.:

<link href="https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/froala-editor@latest/js/froala_editor.pkgd.min.js"></script>

<textarea></textarea>

<script> new FroalaEditor('textarea'); </script>

1 - Write whatever text you want. 2 - Select an white space in this text. 3 - Press ENTER. 4 - Press BACKSPACE. 5 - Add the last deleted space. 6 - Start writing on other part of the text. 7 - Click ENTER, BACKSPACE OR DELETE - It will jump to the point where you did the steps 1, 2 and 3.

*This behavior does not happen in JSFiddle for some reason.

Editor version.

4.0.13

OS.

Windows 10

Browser.

Edge, Chrome, Opera

Recording.

< dont have any, sorry, but is pretty simple to reproduce, you can try those steps in froala`s frontpage -> https://froala.com/wysiwyg-editor/ >

vieiramatheus avatar Aug 03 '22 19:08 vieiramatheus

This is happening a lot. Many of our customers are reporting this annoyance. Please fix ASAP. Thanks!

bpautsch avatar Aug 05 '22 16:08 bpautsch

I reproduced the above issue using the editor in https://froala.com/wysiwyg-editor/examples/character-counter/

Recording

https://user-images.githubusercontent.com/13667955/184984501-285db951-fb4a-41a5-ada3-1747da4d8070.mp4

JoaoRMF avatar Aug 16 '22 21:08 JoaoRMF

Another repro: https://www.loom.com/share/8e729add420f463da393b2a78b032366

natikgadzhi avatar Sep 01 '22 20:09 natikgadzhi