To observe the problem, place the cursor somewhere around “World” and start deleting characters. In the Tiptap version, when deleting a character to the left of a space, a collision occurs. The cause seems to be that ReplaceStep returns incorrect from and to positions, and the slice contains content that shouldn’t be there. The plugin code in track-changes.mjs with appendTransaction is absolutely identical. In Prosemirror version with the same appendTransaction there is no collision and the step has correct from and to positions without any content in slice.
Check track-changes.mjs. When deleting a character to the left of a space, ReplaceStep should return correct from and to positions, and the slice should not contain any content.
Affected Packages
core
Version(s)
2.9.1
Bug Description
Here are two identical examples:
To observe the problem, place the cursor somewhere around “World” and start deleting characters. In the
Tiptap
version, when deleting a character to the left of a space, a collision occurs. The cause seems to be thatReplaceStep
returns incorrectfrom
andto
positions, and theslice
contains content that shouldn’t be there. The plugin code intrack-changes.mjs
withappendTransaction
is absolutely identical. InProsemirror
version with the sameappendTransaction
there is no collision and the step has correctfrom
andto
positions without any content inslice
.Browser Used
Chrome
Code Example URL
https://codesandbox.io/p/sandbox/wsksjg
Expected Behavior
Check
track-changes.mjs
. When deleting a character to the left of a space,ReplaceStep
should return correctfrom
andto
positions, and theslice
should not contain any content.Additional Context (Optional)
Video from Prosemirror version: https://github.com/user-attachments/assets/bc1ca47d-4860-40ba-a34a-309bc180c0e6
Video from Tiptap version: https://github.com/user-attachments/assets/cf9095fb-f730-4548-842f-e53641729af9
Dependency Updates