react-live icon indicating copy to clipboard operation
react-live copied to clipboard

Pasting a new line causes incorrect cursor movement

Open zhzz opened this issue 10 months ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Code Sandbox link

No response

Bug report

Hi,

There is a strange behavior in the current 4.18.0 version. It is easily reproducible on the docs website:

  1. Copy a piece of code with a new line in it
  2. Paste it somewhere in the editor several times in a row
  3. See the cursor moves forward and breaks the code eventually

https://github.com/user-attachments/assets/8acc39af-7a63-4dea-9310-34d0774cf8f7

zhzz avatar Jan 28 '25 05:01 zhzz

Looks like a repeat of #377, #343 and #308. It's a shame these cursor issues keep coming back, I would really like to use this library again as it's more maintained than the alternatives, but this is a pretty big blocker.

mryechkin avatar May 06 '25 02:05 mryechkin