Third party Copied text is pasted as a block / Soft line breaks included in copied text

CStrategies

Member
Affected version
XF 2.2x
Note to devs: I believe this might have been fixed in Froala 4.0.19 https://froala.com/wysiwyg-editor/changelog/#4.0.19

Users reported this and it can be replicated here.

Type some text

Hit shift-enter for a soft line break and type some more text

Highlight second line of text and copy/paste, entire block including first line of text is copied and pasted. Does not happen with hard line breaks.
 
We have rolled out Froala 4.0.19 here today so, subject to various caches refreshing, you shouldn't be able to reproduce that issue here any longer.

Let us know if that isn't the case.
 
Attempted on multiple browsers after clearing cache and still having issue. Maybe a server or cloud cache issue. I will try tomorrow.

test1
test2 (shift enter)
test 3 (shift enter)

Copy/paste of line "test 3":

Attempted on multiple browsers after clearing cache and still having issue. Maybe a server or cloud cache issue. I will try tomorrow.

test1
test2 (shift enter)
test 3 (shift enter)

Copy/paste of line "test 3":
 
Pretty sure this, in fact, is not fixed by Froala v4.0.19.

So their changelog may be referring to something different.

We do have v4.1.2 available to us, but I'm deeply untrusting of anything that Froala release into the wild so I'm not promising we can roll that out for the next release.

For now, we'll have to keep this open.
 
Ahh, I see what was happening.

If you have the text already in the editor and refresh the page the <br> is converted to <p>, which is why it seemed to work.
 
This same bug causes a more annoying issue. If there are soft line breaks in your text, and you highlight some of the text and create a hyperlink, it will move the hyperlinked text to a different position in the paragraph.

As a result, users have to avoid all soft line breaks, or only insert links from scratch using the toolbar and never by highlighting text.
 
Top Bottom