lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Bug: Cursor jump to the end of the document when a collaborator deletes focusing paragraph

Open matsuyama-k1 opened this issue 1 year ago • 2 comments

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.

matsuyama-k1 avatar Apr 27 '24 07:04 matsuyama-k1

I already have a solution

matsuyama-k1 avatar Apr 27 '24 07:04 matsuyama-k1

Nice find!

ivailop7 avatar Apr 27 '24 12:04 ivailop7