You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
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
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 ).
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.
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.
@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...
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.
👋 @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 😀
Activity
strindhaug commentedon Aug 11, 2016
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.
lee-dohm commentedon Aug 11, 2016
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.
strindhaug commentedon Aug 12, 2016
@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...
pwnall commentedon Jan 28, 2017
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.
lee-dohm commentedon Jan 28, 2017
👋 @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 😀