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

Backspace also delete <br> tags

Open antonwebnauts opened this issue 2 years ago • 4 comments

In editor we have just plain paragraph. Option enter is default(FroalaEditor.ENTER_P). Use combination Shift+Enter to insert
tag. After try to delete text below enters with the backspace button

Expected behavior.

It wiil delete a letter, which is located left of cursor

Actual behavior.

It delete a letter and a
tag

Steps to reproduce the problem.

In editor we have just plain paragraph. Option enter is default(FroalaEditor.ENTER_P). Use combination Shift+Enter to insert
tag. After try to delete text below enters with the backspace button

Editor version.

I used https://froala.com/wysiwyg-editor/examples/enter/ and in my version of Froala 4.0.11

OS.

Windows 10

Browser.

Google Chrome, Mozilla

Recording.

https://user-images.githubusercontent.com/81618890/178103213-733f0a47-c762-40b4-bf1b-92ec02681e46.mp4

antonwebnauts avatar Jul 09 '22 11:07 antonwebnauts

I've now seen this problem reported separately from many users of my team's product.

@antonwebnauts's repro points out that this problem arises if Froala is configured to use <br>s. Regardless of 'enter' config, this problem is becoming very common for us when users paste in content. Also, even with default enter config that does not use <br>s, users can create this problem for themselves by using shift-enter.

Lateworm avatar Jul 26 '22 18:07 Lateworm

Here, I'm on the Froala hompage. I user shift-enter to create the problematic markup, then backspace to show Froala removing <br> elements.

https://user-images.githubusercontent.com/28849529/181080584-0cb4d283-1461-47fb-b277-45e2da2eb8ae.mov

Lateworm avatar Jul 26 '22 18:07 Lateworm

I don't think this depends on the operating system — quite easy to reproduce on Mac OS + Firefox, too.

As a work around, seems like if the <br> tags are wrapped in <p></p>, they don't get deleted.

@antonwebnauts, what version of Froala are you running, and did you try previous versions?

natikgadzhi avatar Jul 29 '22 19:07 natikgadzhi

https://www.loom.com/share/8e729add420f463da393b2a78b032366 This is still going.

natikgadzhi avatar Sep 01 '22 20:09 natikgadzhi

We're experiencing this as well. We're running 4.0.14 via angular-froala-wysiwyg

chrille112 avatar Oct 14 '22 06:10 chrille112

Hi Team, Please provide an ETR for the fix/ work around. This issue is very annoying for the clients. We are currently on Froala 4.0.14

Sameera-Github avatar Nov 03 '22 03:11 Sameera-Github

any news about this? we are also experiencing this issue even using the licensed version It seems issue was reported a couple of month ago, and it is very annoying for the clients :/

claudioldf avatar Nov 14 '22 15:11 claudioldf

Version 4.0.15 seems to fix the issue 🙌🏼 https://github.com/froala/wysiwyg-editor/releases/tag/v4.0.15

Fixed, BackSpace removes extra BR from editor content.

Note: Froala editor example isn't on the latest version (currently v4.0.14)

timoteo27 avatar Nov 14 '22 18:11 timoteo27