Description
After typing normal text in the middle of an existing line and pressing Cmd+Z, the caret can jump to the beginning of the current visual line.
This is not specific to examples/editable-voids. The tester observed the same caret restoration problem across multiple Slate examples.
This is separate from the Chinese IME composition issue. This issue uses normal text input followed by Cmd+Z.
Recording
Screenshots attached below:
Local actual behavior:
Live reference expected behavior:
Video attached below:
CleanShot.2026-05-07.at.15.08.39.mp4
Sandbox
No standalone sandbox. Reproduced in the Slate examples site.
Local reproduction URL examples:
http://localhost:3100/examples/plain-text
http://localhost:3100/examples/richtext
http://localhost:3100/examples/images
http://localhost:3100/examples/editable-voids
Live reference URL examples:
https://www.slatejs.org/examples/plain-text
https://www.slatejs.org/examples/richtext
https://www.slatejs.org/examples/images
https://www.slatejs.org/examples/editable-voids
Steps
To reproduce the behavior:
Open any Slate example with editable text, such as examples/plain-text, examples/richtext, examples/images, or examples/editable-voids.
Click in the middle of an existing visual line of text.
Type a short marker string, such as abc.
Press Cmd+Z.
Observe where the caret is restored after the typed text is undone.
Expectation
After undoing the typed text, the caret should remain near the original edit position.
Live reference expected behavior:
The typed text is undone.
The caret does not jump to the beginning of the current visual line.
Actual behavior
Local actual behavior:
The typed text is undone.
The caret jumps to the beginning of the current visual line.
Environment
Slate Version: v2 branch, commit ce2bd6c6
Operating System: macOS
Browser: Chrome
Local examples site: http://localhost:3100
Live reference site: https://www.slatejs.org
TypeScript Version: No response
Context
This is a cross-example caret/selection restoration issue after normal typing and undo. It should be tracked separately from:
Chinese IME composition caret offset issues.
Editable Voids runtime crashes during focus/undo interactions.
Description
After typing normal text in the middle of an existing line and pressing
Cmd+Z, the caret can jump to the beginning of the current visual line.This is not specific to
examples/editable-voids. The tester observed the same caret restoration problem across multiple Slate examples.This is separate from the Chinese IME composition issue. This issue uses normal text input followed by
Cmd+Z.Recording
Screenshots attached below:
Local actual behavior:
Live reference expected behavior:
Video attached below:
CleanShot.2026-05-07.at.15.08.39.mp4
Sandbox
No standalone sandbox. Reproduced in the Slate examples site.
Local reproduction URL examples:
http://localhost:3100/examples/plain-texthttp://localhost:3100/examples/richtexthttp://localhost:3100/examples/imageshttp://localhost:3100/examples/editable-voidsLive reference URL examples:
https://www.slatejs.org/examples/plain-texthttps://www.slatejs.org/examples/richtexthttps://www.slatejs.org/examples/imageshttps://www.slatejs.org/examples/editable-voidsSteps
To reproduce the behavior:
examples/plain-text,examples/richtext,examples/images, orexamples/editable-voids.abc.Cmd+Z.Expectation
After undoing the typed text, the caret should remain near the original edit position.
Live reference expected behavior:
Actual behavior
Local actual behavior:
Environment
v2branch, commitce2bd6c6http://localhost:3100https://www.slatejs.orgContext
This is a cross-example caret/selection restoration issue after normal typing and undo. It should be tracked separately from: