Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Copy/Paste Pasting on Linebreak node moves text multiple lines #2605

Open
caitsithlord opened this issue Jul 6, 2022 · 4 comments · Fixed by #2607
Open

Bug: Copy/Paste Pasting on Linebreak node moves text multiple lines #2605

caitsithlord opened this issue Jul 6, 2022 · 4 comments · Fixed by #2607
Assignees
Labels
all-platforms-bug copy+paste Relates to Lexical Copy/Paste

Comments

@caitsithlord
Copy link

Lexical version: [v0.3.6]

Steps To Reproduce

  1. Create a code block with an empty first line
  2. Copy something
  3. Paste it on to the first line of the code block

You can run this on the playground. I believe it happens for

Screen.Recording.2022-07-06.at.2.38.37.PM.mov

Link to code example:
https://playground.lexical.dev/

The current behavior

Pastes at the end of the code block

The expected behavior

Paste where the cursor is

@caitsithlord
Copy link
Author

caitsithlord commented Jul 7, 2022

I think this shouldn't have been closed: it's a different bug that has to do with linebreaks and not specific to code blocks. Here's an example with a normal paragraph node. The code block one is still reproducible on playground too.

Screen.Recording.2022-07-07.at.2.17.03.PM.mov
Screen.Recording.2022-07-07.at.2.18.47.PM.mov

@fantactuka
Copy link
Contributor

You're right, it's a different issue!

@fantactuka fantactuka reopened this Jul 7, 2022
@caitsithlord caitsithlord changed the title Bug: Copy/Paste Pasting inside code blocks will paste it at the end of a block Bug: Copy/Paste Pasting on Linebreak node moves text multiple lines Jul 9, 2022
@thegreatercurve thegreatercurve self-assigned this Nov 24, 2022
@thegreatercurve
Copy link
Contributor

I'll try to repro this and will then assign it internally.

@zurfyx zurfyx added all-platforms-bug copy+paste Relates to Lexical Copy/Paste labels Apr 12, 2023
@Pydare
Copy link

Pydare commented Nov 6, 2023

I think this issue can be closed. I tried reproducing and it works for me.

Screen.Recording.2023-11-06.at.17.30.48.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all-platforms-bug copy+paste Relates to Lexical Copy/Paste
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants