Closed benatkin closed 5 months ago
In fact that's the expected behavior. Prosemirror based editors (like tiptap, remirror, prosekit) all behaved the same because the behavior is actually provided by prosemirror-history. I remember there were some discussion (like pm-677) about the behavior in the prosemirror community. I think the cursor restore should be considered as a feature.
It isn't familiar to me. What's more familiar is how CodeMirror, vscode, and Google Docs behave - the restored text is visible upon pressing Ctrl Shift Z
You can still customize the behavior if it doesn't fit your needs.
Initial checklist
Affected packages and versions
7.3.5
Link to runnable example
No response
Steps to reproduce
Type "hello" below the header on https://milkdown.dev/playground
Press Command-down to go to the bottom
Press Ctrl-Z to undo. It scrolls to the top.
Press Ctrl-shift-z to redo. It scrolls back to the bottom.
undo-redo.webm
Expected behavior
It should stay at the top so the user can see "Hello" after ctrl-shift-z
Actual behavior
It scrolls to the bottom where ctrl-z was typed
Runtime
Chrome
OS
macOS
Build and bundle tools
No response