lexical
lexical copied to clipboard
Bug: Cursor jump to the end of the document when a collaborator deletes focusing paragraph
Lexical version: 0.14.5
Steps To Reproduce
- Launch the Playground in collaboration mode
- Open two windows (A and B)
- In window A, select a line
- In window B, delete the line that is selected in window A
- 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.
I already have a solution
Nice find!