Move (not copy) an item to a different directory by drag-and-drop?

Hi,

In the Zotero desktop application (Linux, more precisely NixOS), or in the web version (using Firefox on Linux, if it matters), dragging an item from one directory to another (within the same library) seems to actually copy the item: after doing this, the item is visible in the new directory, but remains visible in the old one. The workaround I found is to delete the item from the old directory (with the risk of deleting it it both places by mistake).

From the documentation, it seems that holding Shift while dragging should move items instead of copying them, but it's not the case for me (I tried holding the Shift key during the whole drag-and-drop, i.e. pressing-and-holding Shift, then drag-and-drop, then release Shift, or pressing Shift only while releasing the mouse, no difference).

Also, holding Control during drag-and-drop displays a small (+) sign, which is the usual GUI indicator for "this drag-and-drop will actually copy, not move", but since no-Control key already copies, I see no difference other than the (+) indicator between holding Control and not holding it.

Is this a bug? Or the expected behavior? If so, what is the rationale (I find it very disturbing, but I may have missed something)

Thank you in advance,
  • tnajdek Zotero Team
    The Shift+drag behavior to move items is a feature of the desktop client -- the documentation describes desktop behavior and doesn't apply to the web library.

    In the web library, drag-and-drop always adds to the new collection, not moves. This is a known limitation we'd like to improve in the future, but there's no concrete timeline.
  • First, see https://www.zotero.org/support/collections_and_tags#the_zotero_collections_model

    dragging an item doesn't, in the technical sense, copy it, it just places it in both the original and the target collection. Similarly, removing an item from all collections it's in will not delete it.

    The correct modifier key to just move an item from one collection to another on Linux is Shift, not Ctrl. Note that this just isn't possible in the web library (other than by moving, then removing from the origin collection). It's possible this isn't working correctly on specific Linux distros; I don't think NixOS is seeing any testing.
  • > The Shift+drag behavior to move items is a feature of the desktop client

    I tried both the desktop client and the web version, none of them work. Perhaps a NixOS packaging bug, I'll try to test on another distro when I have the opportunity to do so. Am I supposed to see a visual indicator when pressing Shift while dragging?
  • tnajdek Zotero Team
    edited today at 8:48am
    As explained above, this is not supported in the web library.

    In the desktop client, on Linux, Shift+drag works, but there is no visual feedback to indicate the different behaviour when the Shift key is pressed or released (we will see if we can improve this). Once dropped, if Shift was held, the item is moved; if it wasn't, it is added to the target collection.

    I very much doubt there is a packaging bug that would break this on NixOS. I've confirmed the behaviour described above works on the current release of Zotero on both Ubuntu and Arch Linux.
  • How did you install Zotero? And which version are you on?
  • > As explained above, this is not supported in the web library.

    I understood that (after my initial post), my point is that I *also* tried the desktop.

    > In the desktop client, on Linux, Shift+drag works, but there is no visual feedback to indicate the different behaviour when the Shift key is pressed or released (we will see if we can improve this). Once dropped, if Shift was held, the item is moved; if it wasn't, it is added to the target collection.

    OK, after investigating a bit I found a workaround to reproduce this behavior.

    The bug (Shift having no effect) triggers when GDK_BACKEND is not set, in which case Gtk probably uses the Wayland backend.

    The workaround is to launch zotero like this:

    GDK_BACKEND=x11 zotero

    (In case you're interested: I noticed I had different behavior when launching zotero from vscode or another terminal, and then binary-searched through the differences in the output of env. I didn't expect anything like this !)

    Is Zotero Desktop known to work on Wayland?

    > How did you install Zotero? And which version are you on?

    This is the Zotero package from the stable NixOS channel. It's a relatively old version: 7.0.27 (64-bit). I should try an upgrade when I get time.

    (I was expecting the issue to be between the chair and the keyboard so I didn't try all the usual stuff to do before reporting a bug before asking, actually!)
  • Note that Zotero doesn't release official packages except a semi-authoritative .deb (and the official tarball)
    https://www.zotero.org/support/installation#linux

    Any issues you see may well be package rather than linux related (and yes, you should definitely update)
  • OK, unfortunately upgrading didn't solve the problem, Zotero 9.0.2 has the same bug on my machine.

    For the details, I did this to get a new version and test:

    $ nix-shell -I nixpkgs=channel:nixpkgs-unstable -p zotero
    [nix-shell:~]$ unset GDK_BACKEND
    [nix-shell:~]$ zotero

    I don't know if it's a specific NixOS bug, or more generally a zotero-on-wayland one.
Sign In or Register to comment.