Bug: Cursor jump to the end of the document when a collaborator deletes focusing paragraph
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
Lexical version: 0.14.5
## Steps To Reproduce
1. Launch the Playground in collaboration mode
2. Open two windows (A and B)
3. In window A, select a line
4. In window B, delete the line that is selected in window A
5. The focus in window A moves to the end of the document
## The current behavior
In the video, cursor in the right window jump to the end of the document when the paragraph is deleted from the left window.
This issue forces the cursor to the end of the editor during collaborative editing, which disrupts smooth editing experience.
https://github.com/facebook/lexical/assets/111737064/2cfd5dcf-edf4-4297-878d-7cb438141634
## The expected behavior
The cursor should not move to the end of the document when the collaborator deletes focusing paragraph.
Contributor guide
Research direction
Start by reproducing the issue in the Playground's collaboration mode with two windows, following the five steps in the report. Then trace how a remote deletion of the focused paragraph updates the selection. Done means the affected cursor no longer jumps to the document end when the collaborator deletes that paragraph, while normal collaborative editing still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100