Zotero 7: Cursor jumps to end of annotation after Home and Backspace

After pasting certain text, the sequence of Home followed by Backspace can make the cursor jump to the end of the annotation.

1. Set the Quick Copy Item Format to American Psychological Association 7th edition.
2. Open any PDF.
2. Go to the main library view, select an item in the library, and go to Edit -> Copy Bibliography (or hit Ctrl + Shift + c).
3. Go to the PDF opened in Step 2 and highlight some text.
4. In the annotation comment box, paste (via Ctrl + v) and then start typing some text. Notice that the new text appears on a new line because the pasted text ends with a newline character.
5. Hit Home, followed by Backspace to remove the newline introduced in the previous step.
6. Notice that the newline was removed, but the cursor has also jumped to the end of the annotation.

The problem does not occur if in step 5, we press the left arrow key (enough times to get to the beginning of the line) instead of Home.

See the below video for an example:

https://drive.google.com/file/d/1yhwTTVpOsgxaNUHbT_wXrXUNna6z0dR6/view?usp=sharing

This is using version 7.0.0-beta.54+6b996d4f9 (64-bit) on Linux.
  • Can anyone reproduce this on Windows or macOS?
  • I can reproduce on Windows 10.

    A few remarks:
    - If I replace the Ctrl+V in step 4 by Ctrl+Shift+V, the problem disappears. This suggests that some kind of formatting character is guilty here.
    - Notice that after doing the Ctrl+V, you cannot see the cursor position (no blinking vertical line). But you can see it after a line return if you do Ctrl+Shift+V.
    - If you type some text in the comment before pasting in step 4, and then put the cursor in the middle of the text you have typed and then paste, you see a line return appearing before and after the citation. These line returns do not appear if you paste the same citation within some text in a Zotero note.
    - If you click at the end of the citation text after pasting and before typing new text, it does not go to the next line and the problem disappears.

    Debug ID: D206166666
Sign In or Register to comment.