Bug: Copy-paste doesn't work correctly with line break.
Copy-pasting text containing line-break nodes will cause text to insert incorrectly.
Lexical version: v0.6
Steps To Reproduce
-
Copy the following text and paste into the playground: This is the first line.
And this is the second line.
And this is the third line. -
Select the second line by double clicking on it.
-
Copy.
-
Click on the end of the first line to move the caret there.
-
Hit enter to create a new line.
-
Paste.
The current behavior
Text is pasted at the end of the document.
https://user-images.githubusercontent.com/6975606/199627667-ff544948-dd55-4ddf-89d7-323aa408ab18.mov
The expected behavior
Text is pasted where the caret is.
I'm unable to reproduce this bug. Can you confirm this on your side too?
Yes, can be reproduced in the playground following the steps.
Are you trying on https://playground.lexical.dev/? Also what OS/Browser are you using?
Yes. Chrome 107, Mac OS.