Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Pasting a new line causes incorrect cursor movement

Open
#409 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
react, typescript
Domain
frontend

Research direction

Reproduce the issue on the linked React Live docs website by repeatedly pasting code containing a newline. Trace the editor's paste and cursor-position handling, then verify that repeated multiline pastes leave the cursor in the correct position and do not corrupt the code.

Written by the indexing model from the issue text.

Description

bug
Is there an existing issue for this?
  • I have searched the existing issues
Code of Conduct
  • 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

Dominant language
TypeScript
Stars
4.6k
Forks
260
Avg merge
6d 18h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FormidableLabs/react-live

All issues in FormidableLabs/react-live

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.