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

Ongoing issue with backspace

Open thenitai opened this issue 2 years ago • 7 comments

Reported for v3 already, but still exists in v4.

You can replicate it with the editor on your homepage.

  1. Type "this is a test".
  2. Insert the word "new" to have a sentence like " this is a new test".
  3. Go to the end of the line.
  4. Hit backspace.

Result: The cursor jumps before the word "test" and starts removing from there.

Since seeing is believing:

2022-06-15_17-41-24 (1)

thenitai avatar Jun 15 '22 21:06 thenitai

I'm hoping/expecting this will be fixed very quickly. It was easy to reproduce and even after typing more text, erasing jumps to the wrong place.

Krisell avatar Jun 20 '22 09:06 Krisell

I'm hoping/expecting this will be fixed very quickly. It was easy to reproduce and even after typing more text, erasing jumps to the wrong place.

Good luck with that. The Froala team notoriously disregards any comments on here or hardly ever replies. I guess customers that don't pay for support anymore are not good customers to them.

thenitai avatar Jun 22 '22 23:06 thenitai

Seems to be related to the 'url' plugin, disabling that one solves the issue for me.

JeppeKnockaert avatar Jun 23 '22 11:06 JeppeKnockaert

Seems to be related to the 'url' plugin, disabling that one solves the issue for me.

That explains why we don't see this error in our use case, thanks for this info!

Krisell avatar Jun 23 '22 11:06 Krisell

So I investigated this a little further, these are my conclusions:

It gets caused by the insertion of the marker and the subsequent regex match that prevents the deletion of the marker if the text isn't a URL.

This snippet of minified code in url.min.js: l.markers.insert();var n=l.$el.find(".fr-marker");if(!t.textContent.match(/(^| |\u00

The issue doesn't happen instead of adding the word "new" in "this is a new test" (see reproducible case above), you add a url, e.g. "this is a github.com test"

This code was introduced in v4.0.12

JeppeKnockaert avatar Jun 23 '22 12:06 JeppeKnockaert

This error is also occurring when pressing Shift+Enter keys, with no plugin loaded.

By pressing backspace it deletes the content before the text.

https://user-images.githubusercontent.com/84974439/175315334-42f439e9-e297-4d03-9e30-668c6f618aba.mov

El-Tommy avatar Jun 23 '22 13:06 El-Tommy

The fix will be available in the next editor release which is expected to be released by the late third week of this month

ilyaskarim avatar Aug 03 '22 15:08 ilyaskarim

Fixed in V4.0.14 https://froala.com/wysiwyg-editor/changelog/#4.0.14

ilyaskarim avatar Aug 24 '22 17:08 ilyaskarim

@ilyaskarim no, this issue is not resolved.

natikgadzhi avatar Sep 01 '22 20:09 natikgadzhi