Open
Description
I noticed a bug while trying to share a history stack across a parent and nested editor. I manually created a history stack and passed it the HistoryPlugin
for both editors.
Unfortunately, the "redo" behavior isn't working as expected. When making edits in both editors, only the child's content is restored. There's a point in the "redo" stack where the parent's content should be restored, but only the selection changes.
Lexical version: 0.10.0
Steps To Reproduce
- Edit text in parent editor
- Edit text in image caption
- Undo caption edit
- Undo parent edit
- Redo parent edit (fails! Jumps to caption editor, but does not reinstate text)
- Redo caption edit
Screen_Recording_2023-04-17_at_3.48.54_PM.mov
Link to code example: https://playground.lexical.dev/
The current behavior
The parent editor's selection is restored, but not its content.
The expected behavior
The parent editor's selection and content are restored.