After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766089 - Unpredictable behaviour for single/double mouse clicks
Unpredictable behaviour for single/double mouse clicks
Status: RESOLVED DUPLICATE of bug 758065
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2016-05-07 00:25 UTC by Adam Nielsen
Modified: 2017-02-15 08:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Nielsen 2016-05-07 00:25:01 UTC
The GTK file chooser has recently started treating a single-click on a selected file or folder as if it was double-clicked on, opening the file.

This leads to unpredictable behaviour, because as you browse through the filesystem, you need to double-click on most folders to open them, but you must then remember not to double-click if the folder you want to browse into is the first in the list (which is already selected upon entering a folder.)

If you just get into the habit of always double-clicking, like you do in other operating systems, then when you accidentally double-click on the first folder in the list, the first click opens the folder, and the second click selects the first file inside the folder, which is usually not the file you intended to select.

This means when you expect the folder to open, you end up selecting a file inside the folder that you didn't want to.

I have been bitten by this undesirable behaviour when uploading files to websites, by browsing for an image but the GTK file chooser selecting a random file, resulting in the wrong image being uploaded.

I think based on the principles of least surprise, the file chooser should either always select files on a single click, or always select files on a double click.  Selecting files on a double-click sometimes, and on a single click at other times, leads to frustration and the inability to trust that the correct file will be selected.
Comment 1 Thomas Lange 2016-05-11 17:47:42 UTC
(In reply to Adam Nielsen from comment #0)
> If you just get into the habit of always double-clicking, like you do in
> other operating systems, then when you accidentally double-click on the
> first folder in the list, the first click opens the folder, and the second
> click selects the first file inside the folder, which is usually not the
> file you intended to select.

Not only other operating systems, but also GTK2 and Qt applications consistently use double-clicks. The reported issue is really distracting on a desktop with multiple toolkits.
Comment 2 lex 2016-06-15 10:38:13 UTC
I've sent a very personal file on the internet because of this "feature".

GTK developers, please acknowledge that Gnome is not the only existent DE. We use GTK3, GTK2 and Qt applications over different desktop environments. A simple config switch to enable/disable single click mode can make everyone happy. Free software users around the world, make your voice heard!

In the meantime, people interested in the "old" double click behavior can revert this commit https://git.gnome.org/browse/gtk%2B/commit/?id=fb0a13b7f070a14312dafa1e4df6ba03cf33be01 and rebuild GTK.

Thank you.
Comment 3 bangcok_dangerus2 2016-07-25 14:22:35 UTC
I also find myself constantly selecting the wrong file as a result of this behaviour. A setting to disable it would be helpful it is to remain the default.
Comment 4 Igor Liferenko 2016-07-28 09:41:29 UTC
I'm also hit by this. Please consider adding a setting to revert to previous behavior.
Comment 5 bangcok_dangerus2 2016-07-28 15:20:59 UTC
The worst side-effect that results from this behaviour happens because the first item in the list of files/directories is pre-selected, so it it's a directory a single click opens it. Consider the following:

The top level item is a directory that I want to open, I double click on it. However, as it is pre-selected it opens with the first click, and the second click lands on and selects the (already highlighted) top-listed file in the directory, closing the dialog as if I clicked "OK".
Comment 6 Radu Rendec 2016-07-28 20:06:09 UTC
Same here. A setting to revert to the previous behaviour would be extremely helpful.

@lex: many thanks for the link to the git commit. I successfully applied the reverse patch to gtk+-3.20.6 (on Fedora 24, FWIW).
Comment 7 Matthias Clasen 2016-08-11 15:18:38 UTC

*** This bug has been marked as a duplicate of bug 758065 ***