Lexical version: 0.45
Steps To Reproduce
- Create a decorator node containing a nested lexical instance with a registered SharedHistoryExtension.
- In the node component, register a listener for updating the nested editor instance. In the callback, trigger the update of the outer editor
- Write text in an external editor and in a nested editor
- Press Ctrl + Z in the nested editor
Link to code example: https://codesandbox.io/p/sandbox/5qg5ff
The current behavior
Shared history between editors doesn't work. Undo doesn't undo actions within a nested editor. But it correctly if the update has HISTORIC_TAG or you don't call the external editor update at all
The expected behavior
The shared history works regardless of whether the external editor is updated when the nested one is updated or not.
Impact of fix
Synchronizing updates between nested editors and the external one is important to trigger node serialization. But this pattern causes a non-obvious bug with a shared history
Lexical version: 0.45
Steps To Reproduce
Link to code example: https://codesandbox.io/p/sandbox/5qg5ff
The current behavior
Shared history between editors doesn't work. Undo doesn't undo actions within a nested editor. But it correctly if the update has
HISTORIC_TAGor you don't call the external editor update at allThe expected behavior
The shared history works regardless of whether the external editor is updated when the nested one is updated or not.
Impact of fix
Synchronizing updates between nested editors and the external one is important to trigger node serialization. But this pattern causes a non-obvious bug with a shared history