files icon indicating copy to clipboard operation
files copied to clipboard

In a file > open dialog the active file is always part of the selection

Open wout opened this issue 1 year ago • 8 comments

What Happened?

I'm unsure if this is related to files, but I can't think of any other place to report it.

There is a long-standing bug in applications that use the default elementary OS modal for File > Open. The highlighted active file is always added to the selection, even if you drag a box over a series of files that do not include that active file.

For example, here, the folder "api" was selected when opening the dialog, and I drew a box around the files at the bottom:

image

Now, the "api" folder is part of the selection if I click "open", even if I didn't select it. But the same is true if I select one file, effectively marking it as active, and then drag a box over a set of other files. The file I clicked before will remain part of the selection, even if that's not the intention.

Steps to Reproduce

  1. In an application, choose File > Open
  2. Drag a box around several files that do not include the active one
  3. CLick Open

Expected Behavior

When dragging a box around files, the active one should be part of that list—perhaps making the first one dragged around the active one?

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

         eeeeeeeeeeeeeeeee            wout@Framey 
      eeeeeeeeeeeeeeeeeeeeeee         ----------- 
    eeeee  eeeeeeeeeeee   eeeee       OS: elementary OS 7.1 Horus x86_64 
  eeee   eeeee       eee     eeee     Host: Laptop (12th Gen Intel Core) A8 
 eeee   eeee          eee     eeee    Kernel: 6.8.0-40-generic 
eee    eee            eee       eee   Uptime: 11 days, 5 hours, 43 mins 
eee   eee            eee        eee   Packages: 2822 (dpkg), 108 (flatpak), 16 (snap) 
ee    eee           eeee       eeee   Shell: bash 5.1.16 
ee    eee         eeeee      eeeeee   Resolution: 3000x2000 
ee    eee       eeeee      eeeee ee   DE: Pantheon 
eee   eeee   eeeeee      eeeee  eee   WM: Mutter(Gala) 
eee    eeeeeeeeee     eeeeee    eee   Theme: io.elementary.stylesheet.mint [GTK3] 
 eeeeeeeeeeeeeeeeeeeeeeee    eeeee    Icons: elementary [GTK3] 
  eeeeeeee eeeeeeeeeeee      eeee     Terminal: io.elementary.t 
    eeeee                 eeeee       CPU: 12th Gen Intel i7-1280P (20) @ 4.700GHz 
      eeeeeee         eeeeeee         GPU: Intel Alder Lake-P 
         eeeeeeeeeeeeeeeee            Memory: 22014MiB / 64010MiB 

wout avatar Sep 18 '24 17:09 wout

Is this happening in a FileChooser window or in a Files window. I can get this to happen in a FileChooser window if you select a file and then rubberband select other files starting on the blank area below the list. Otherwise if you start the rubberband selection on a file item that file item becomes the active one and the other is deselected. However in Files, clicking on the blank area below the list also deselects the active fileitem.

In the case of the FileChooser I suspect this is an upstream issue with Gtk since we only modify the pathbar of the filechooser.

jeremypw avatar Sep 18 '24 18:09 jeremypw

a Filechooser is the one you get from within applications, right? Because that's the one.

wout avatar Sep 19 '24 17:09 wout

@wout Yes, the FileChooser is what shows when you press, for example, an "Open File" button or menu option from within an app such as Code

jeremypw avatar Sep 20 '24 08:09 jeremypw

So, should this be reported upstream?

wout avatar Sep 20 '24 15:09 wout

I guess so, if it hasn't already. I'll check.

jeremypw avatar Sep 23 '24 16:09 jeremypw

Actually, come to think of it the Gtk.FileChooser is deprecated in Gtk4 so unlikely to be fixed (?) I don't know whether the replacement (Gtk.FileDialog) has the same problem.

jeremypw avatar Sep 23 '24 16:09 jeremypw

There are 57 open bug reports against Gtk.FileChooser here https://gitlab.gnome.org/GNOME/gtk/-/issues/?sort=created_date&state=opened&search=file%20chooser&first_page_size=20 I didn't see this one though.

jeremypw avatar Sep 23 '24 16:09 jeremypw

Actually, come to think of it the Gtk.FileChooser is deprecated in Gtk4 so unlikely to be fixed (?) I don't know whether the replacement (Gtk.FileDialog) has the same problem.

Okay, so maybe it's good to wait this one out then 🙂️.

wout avatar Sep 24 '24 06:09 wout