Bug: Cursor jumps in CodeMirror

Platform: Windows 10
Joplin: v1.0.234 or v1.0.235 (dev)

Description

Step 1. Compose a note that ends with a long line so that it is wrapped to multiple lines.
Step 2. Completely close Joplin and then reopen.
Step 3. UpArrow or DownArrow keys cause the cursor to jump between the first and the last lines. (Expected behavior: the cursors are moved one line upward or downward.)

demo

Aditional context

  • To observe this bug, a long line must be the last line of a note.

  • When the cursor is bugged, editing the note in any way makes the bug disappear.

  • This behavior is not observed in CodeMirror in Joplin v.1.0.233 (current stable release).

2 Likes

Thanks for the clear description of the issue and the reproducible steps. This is one of the best bug reports I've ever seen and I feel like it should be added to the FAQ or something as a guide for others :slight_smile:

Anyway, I was able to track down where the bug was introduced and make a fairly small change to fix it. You can track the fix here.

Thanks!

1 Like

Thank you for the quick fix and your kind words!

1 Like