Too many backspaces will hide annotation

I encountered some unexpected behavior with the desktop version 5.0.97-beta.60+14caa3a89 on Linux. When editing an annotation, hitting backspace too many times makes it appears as if the annotation is deleted. However, the annotation reappears when reopening the PDF.

1. Highlight some text.
2. Attempt to add an annotation by typing 2 characters, followed by 3 backspaces.
3. Notice that the annotation disappears from the sidebar.
4. Close the PDF.
5. Open the PDF and notice that the annotation has reappeared.
  • Thanks for reporting. We'll fix the issue.
  • I was wondering if there were any thoughts about modifying the behavior when a cursor is in focus? I imagine that most people wouldn't expect backspace to delete the annotation when the cursor for adding a comment is visible and focused.

    I was surprised by this again yesterday (version 6.0.19) and almost didn't notice that an annotation got accidentally deleted. The GitHub issue suggests that undo functionality would address this, but I would counter that it's not always obvious when an annotation gets deleted in this manner.

    Related conversations:

    https://forums.zotero.org/discussion/comment/400923/#Comment_400923
    https://forums.zotero.org/discussion/96596/focus-inconsistencies-in-annotation-notes
  • Upon more testing, the current behavior might be worse than described in the original post. Now, after closing and opening the PDF, the deleted annotation does not reappear.
  • edited January 8, 2023
    Yes, Undo isn't relevant here. This is just a bug. It doesn't even always happen — I can only reproduce it occasionally.
  • edited February 21, 2023
    I have encountered the same issue two days in a row now. Here's how my annotations were deleted:

    1. Highlighted some text
    2. Added annotation featuring multiple paragraphs
    3. Attempted to add a section in between two paragraphs by firstly creating multiple empty lines with the Enter key
    4. Hit Backspace two times on an empty line
    5. Instead of going to the above empty lines, the entire annotation and the highlight was deleted

    The Undo function also doesn't work in my case, and I wasn't able to get the annotations back by closing and reopening the PDFs. I'm on macOS Ventura and have the latest version of Zotero installed.

    Edit: Apparently just pressing Backspace two times at any point in the annotation does it as well. It also happens fairly randomly.
Sign In or Register to comment.