Fix selection-finding in joinBackward #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Similar fix from https://github.com/ProseMirror/prosemirror/issues/783, but for
joinBackwardas wellThanks. Did you manage to trigger the problem? At a glance, the code looks pretty safe (delete from
$cursor.before()to$cursor.after(), and then re-resolve$cursor.before()) and doesn't have the problem thatjoinForwardhad (where it used a resolved position from the old document).https://kindhearted-trout.glitch.me/ should trigger the problem (editable version at https://glitch.com/edit/#!/kindhearted-trout).
Backspace the last paragraph until all that's left is an empty li, then backspace the empty list item.
You should get a
RangeError: Position 104 out of range.Ah, I see, when the parent is removed as well you could still get a bogus position. Makes sense. Merged and released as 1.0.7.