ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.5k stars 333 forks source link

[Bug]: Delete one char in gapcursor receviced a transaction with "delete some chars and re-add some chars back" Step. #1475

Open chenyuncai opened 1 week ago

chenyuncai commented 1 week ago

Bug Description when I delete a char, the transaction replace step means I delete somechars and re-add it back, and loss a char what I real delete, it seems fine for end-user, but developer cannot track what real change user made

Browser Used Chrome

Code Example URL https://codesandbox.io/p/sandbox/tiptap-2-bug-ph3v4w

Expected Behavior When I delete a char at anywhere, I want the changed range gived

Additional Context (Optional) I try to make a track-change extension for tiptap, it works in most normal cases but wrong in some custom-node cursor gap, I try to understand why prosemirror give this kind of "ReplaceStep" back

chenyuncai commented 1 week ago

some times input a new char , will get the same action, it seems related to node gap cursor

marijnh commented 1 week ago

Can this be reproduced without TipTap and Vue? I'm not going to debug those libraries.

chenyuncai commented 1 week ago

OK, I will create a new link with clean prosemirror in monday, thanks response