Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Add drag and drop threshold setting (or use system default) #919

Closed

Description

@strindhaug

The drag and drop theshold is ridiculous, it appears to be essentially 0px (or 1-2px; it's hard to tell on my high PPI monitor), meaning I cannot click in the tree view without risking accidentally dragging and dropping files or folders. (There is no undo for this either with makes this even more problematic).

On my system (Ubuntu) in most native apps such as the filemanager the drag theshold is 50px it's stored in dconf under org.gnome.settings-daemon.peripherals.mouse.drag-threshold as an integer, presumably this setting is available to all apps. But (assumning this setting is available to applications) Atom doesn't use this.

There must be a way to change this threshold to something bigger (preferably without any upper limit, so that we can effectively disable it since having a setting to disable drag and drop was wontfixed: #623 ).

Activity

  1. strindhaug commented on Aug 11, 2016

    @strindhaug
    Author

    This issue apperently applies to every draggable element in atom (e.g. the tabs also start dragging without threshold as well ), but it's most noticeable in the tree-view since accidental drag and drop causes random files to be moved.

    So maybe the drag threshold needs to be tweaked in the atom.io itself. The default drag threshold should be set to either the system default or if this is not possible for some reason it should probably be a global setting; in either case it should default/fall back to something closer to 50px rather than 0px.

  2. lee-dohm commented on Aug 11, 2016

    @lee-dohm
    Contributor

    In order to change this, we would have to either fiddle with some low-level Chromium bits or create a complete architecture for how to do drag-and-drop in Atom. Both are a bit beyond what we have the resources available to do at this point. We may revisit this in the future when we have more resources available. If we do, we'll reopen this Issue.

  3. strindhaug commented on Aug 12, 2016

    @strindhaug
    Author

    @lee-dohm so, you're saying this really is a Chromium issue? Actually it seems it may be, just noticed that the tabs in Chrome also starts dragging without much of a threshold (maybe 5px, quite far from my system setting at least). Maybe I should report this upstream to the chromium project...

  4. pwnall commented on Jan 28, 2017

    @pwnall

    Are you guys building your own Chromium? If so, you could patch the values in third_party/WebKit/Source/core/input/MouseEventManager.cpp.

    FWIW, 50px strike me as excessive. The default values for the OS preferences I've looked at are 3px-8px. Also, AFAIK these are CSS pixels, not actual pixels on a HiDPI screen.

    Last, Chromium has a bug for this issue. Unfortunately, based on the current bug popularity vs implementation complexity, I don't expect we'll be able to address it any time soon.

  5. lee-dohm commented on Jan 28, 2017

    @lee-dohm
    Contributor

    👋 @pwnall The Atom team isn't building our own Chromium, no. We get it as part of Electron and use it as-is (though theoretically Electron could do as you suggest if it would make sense for all Electron applications. The Electron team tries to avoid adding more divergences from base Chromium, especially in tricky parts of the code, because then that creates maintenance overhead as we go down the line.

    Thanks very much for the advice and the update! I'll pass it along to the Electron team 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions