Bug: after undo, input anything will be wrong
Lexical version: 0.16.1
Steps To Reproduce
- Enable collaboration feature in Lexical.
- In one editor instance, type a sentence (e.g., "Hello, World!").
- Perform an undo operation to revoke part of the input (e.g., undo "World!").
- Continue typing new content in the same editor instance (e.g., "Collaboration Test").
- Observe the content in another collaborating editor instance.
The current behavior
Upon performing the steps mentioned, the content in the other collaborating editor instance exhibits abnormal replication. Instead of showing the expected content (e.g., "Hello, Collaboration Test"), it displays duplicated or multiplied content (e.g., "Hello, Collaboration TestCollaboration Test" or more).
The expected behavior
Impact of fix
Severity: This bug significantly impacts the usability of the collaboration feature, causing content inconsistencies between collaborating users.
Frequency: The issue occurs consistently and can be reproduced easily following the provided steps.
Affected Users: Any users or teams utilizing the collaboration feature in Lexical would benefit from this fix. It affects the overall experience and reliability of real-time collaboration within the editor.
Hey @lukenc, we're seeing content duplication in production very similar to what you describe, but haven't been able to reproduce it ourselves. Are you still seeing this issue, and if so, would you be able to post a screen recording showing your exact steps and timing?