ProseMirror / prosemirror

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

Pressing ArrowDown cannot move text cursor to the end of atom node #1422

Closed ocavue closed 10 months ago

ocavue commented 10 months ago

After upgrading prosemirror-view from 1.31.6 to 1.32.0, we found a bug with text cursor movement. If the cursor is right after an inline atom node, pressing ArrowUp cannot move the cursor anymore.

Reproduction:

Expected behavior (in the 1.31.6 demo): the text cursor moves to the end of the document (right side of the atom node)

https://github.com/ProseMirror/prosemirror/assets/24715727/a3df3c67-d3e6-42bc-b30a-01f15f3e5bb6

Actually behavior (in the 1.32.0 demo): the text cursor jumps to the end of the document and jumps back.

https://github.com/ProseMirror/prosemirror/assets/24715727/a34a4c01-75b9-46c0-9cfa-02a1b90aec7b

This issue seems to be related to https://github.com/ProseMirror/prosemirror/issues/1406

marijnh commented 10 months ago

Patch 2736542ea41dc174afbf948f745351c8bb0bcce9 seems to help with this.

ocavue commented 10 months ago

Thanks! prosemirror-view@1.32.1 looks good to me.