[Z7 Beta] Tags reappear after quickly deleting them

Hi all,
I've noticed that when deleting many tags in the tab sidebar, they sometimes inadvertently reappear. To reproduce:

1. Open a PDF with a decent amount of tags in the reader.

2. Open the tag view in the right-hand pane.

3. Click on the minus symbol in quick succession to delete all tags.

Expected behaviour: All tags are removed
Actual behaviour: After a second or so, some of the deleted tags reappear in the tag view.

I am able to reproduce that somewhat reliably and have (I hope) managed to capture the behaviour in the debug log: D1437952156
  • I haven’t been able to reproduce this issue yet. If someone else can, please send the debug log as well.

    I suspect it might be linked to the same issue causing annotation comment cursor to jump to the beginning when typing rapidly.
  • For what it's worth I've managed to reproduce reappearing tags on a different system (with a very similiar configuration, though): D760170234

    While doing that I've also noticed that after deleting many tags like this at once the tag counter ended up at "-1 Tags".

    Have a good weekend!
  • edited January 13, 2024
    I can reproduce: Screen recording.
    Windows 10
    Zotero 7.0.0-beta.54+6b996d4f9 (64-bit)
  • I still see this in Beta 105. Debug ID: D84546165
  • I still see the problem in the latest beta:
    Zotero 7.1-beta.46+5e1541c5e (64-bit)
    Windows 10

    It seems to be related to a similar problem when adding tags quickly:
    https://github.com/zotero/zotero/issues/5403
  • I've been able to reproduce some of the glitchiness with tags removal. Do you perform any additional actions before removing many tags to end up with this issue? I ended up with a negative number of tags after adding a number of tags and then deleting them.

    Also, do you have many tags in your selected library and in the tag selector of the library tab? Are you seeing any overall delays in the UI while deleting tags?

    I don't think the number of tags is displayed anywhere in the UI, so you could get that by running this in Developer > Run Javascript:

    let selectorTags = (await ZoteroPane.tagSelector.getTagsAndScope()).tags.length;
    let libraryTags = (await Zotero.Tags.getAllWithin({ libraryID: ZoteroPane.getSelectedLibraryID() })).length;
    return `Tags in selector: ${selectorTags}. Tags in library: ${libraryTags}.`
  • Do you perform any additional actions before removing many tags to end up with this issue?
    No.
    Also, do you have many tags in your selected library and in the tag selector of the library tab?
    From the Javascript code above:
    > Tags in selector: 18630. Tags in library: 18630.
    This is around the same number as the number of items in My Library (17464).
    It is nearly all automatic tags that I do not display in the selector. I only show the manual tags in the selector, which are less than 50.
    Are you seeing any overall delays in the UI while deleting tags?
    No.
Sign In or Register to comment.