Pasting a new line causes incorrect cursor movement
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
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:
- Copy a piece of code with a new line in it
- Paste it somewhere in the editor several times in a row
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FormidableLabs/react-live
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
FormidableLabs/react-live#419 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
FormidableLabs/react-live#417 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
FormidableLabs/react-live#415 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
FormidableLabs/react-live#413 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
FormidableLabs/react-live#411 · 1 comment ·
All issues in FormidableLabs/react-live
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
TanStack/tanstack.com#1293 ·