[upstream] Saving downloads or pages is difficult because of unfocused file chooser dialog

Bug #1949340 reported by Norbert
308
This bug affects 67 people
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Unknown
Mozilla Firefox
Invalid
Unknown
chromium-browser (Ubuntu)
Confirmed
Medium
Unassigned
firefox (Ubuntu)
Confirmed
Undecided
Unassigned
gtk+3.0 (Ubuntu)
Confirmed
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned
gtk4 (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Medium
Unassigned
Kinetic
Fix Released
Medium
Unassigned
xdg-desktop-portal-gnome (Ubuntu)
Confirmed
Undecided
Unassigned
xdg-desktop-portal-gtk (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. Open Chromium (release does not matter, here deb-packaged version from 18.04 LTS is used)
2a. Navigate to some page, press <Ctrl>+<S>
2b. Navigate to some page, with "Ask where to save each file before downloading" enabled try to download some file

Actual result:
* file chooser dialog is unfocused, user should select the window by mouse and then hit <Enter> for specified location

Expected result:
* file chooser dialog is focused, user can simply hit <Enter> to save in previously selected location.

Norbert (nrbrtx)
description: updated
description: updated
Revision history for this message
Norbert (nrbrtx) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can confirm that the chromium snap, as well as the official chrome deb, are similarly affected (tested on stock Ubuntu 21.10).

summary: - Saving downloads or pages is difficult because of unfocused file chooser
- dialog
+ [upstream] Saving downloads or pages is difficult because of unfocused
+ file chooser dialog
Changed in chromium-browser (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in gnome-shell (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
tags: removed: hirsute
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm not sure this bug started out being the same issue we see in GNOME 42 but it seems general enough that we can use it.

Revision history for this message
Islam (islam) wrote :

This issue happens with the file saving dialog and also the open file dialog, with all applications like browsers and nautilus.

Ubuntu 22.04.
gnome-shell 42.
Wayland.

tags: removed: impish
Norbert (nrbrtx)
tags: added: kinetic
Revision history for this message
Roman Strakhov (roman1996123) wrote :

Same here.
Ubuntu 22.04.1 LTS x86_64
Kernel: 5.18.16-xanmod1
WM: i3

Revision history for this message
Jeremy Bícha (jbicha) wrote :

If this is reproducible on stock Ubuntu 21.10, then this isn't only gtk4/xdg-desktop-portal-gnome that's broken, but gtk3/xdg-desktop-portal-gtk too.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

The upstream Chrome bug suggests that this also affects Windows. That's surprising to me because this issue (or a similar one is also affecting our Firefox file dialogs).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Changed in gtk4 (Ubuntu):
status: New → Confirmed
Changed in xdg-desktop-portal-gnome (Ubuntu):
status: New → Confirmed
Changed in xdg-desktop-portal-gtk (Ubuntu):
status: New → Confirmed
Revision history for this message
Rafael Medina (rafael-medina) wrote :

Ubuntu 22.04.1 LTS x86_64
gnome-flashback: 3.44.0-1ubuntu2
Kernel: 5.19.1

It only happens with Firefox (snap version installed here) and Google Chrome.
Firefox snap: 103.0.2
Google Chrome: 104.0.5112.79

Revision history for this message
Rafael Medina (rafael-medina) wrote :

What's happening here is exactly what is mentioned in this Gnome gtk bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/5087

Revision history for this message
In , Heather Ellsworth (hellsworth) wrote :

Created attachment 9289960
Screencast from 08-15-2022 02:31:51 PM.webm

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36

Steps to reproduce:

In the snap on Ubuntu 22.04.1, I tried to save a file by right clicking -> "Save As".

FF version 103.0.2, Mozilla Firefox Snap for Ubuntu, canonical-002 1.0

Actual results:

Then the normal pop up appears, with the suggested title highlighted but keyboard strokes do not change the highlighted default name. However, If I click the top bar of that window, then keystrokes will change the highlighted name.

Expected results:

The highlighted default name should change upon keystrokes immediately after seeing the "Save As" pop up. I should not have to click the top bar of the window (not intuitive).

Revision history for this message
In , Heather Ellsworth (hellsworth) wrote :

I just tested the Chromium snap as well (Chromium Version 104.0.5112.79 (Official Build) snap (64-bit)) and it has the exact same problem. So this may not be a FF issue but maybe a gnome-shell one?

Revision history for this message
In , Release-mgmt-account-bot (release-mgmt-account-bot) wrote :

The [Bugbug](https://github.com/mozilla/bugbug/) bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Revision history for this message
In , Daniel van Vugt (vanvugt) wrote :
no longer affects: gtk
Revision history for this message
Heather Ellsworth (hellsworth) wrote :

The issue exists in the Firefox snap as well: https://bugzilla.mozilla.org/show_bug.cgi?id=1784977

Revision history for this message
In , Lissyx+mozillians (lissyx+mozillians) wrote :

Does it repros under non snap ?

Revision history for this message
In , Heather Ellsworth (hellsworth) wrote :

I downloaded the 103.0.2 tarball from https://www.mozilla.org/en-US/firefox/download/thanks/ and after unpacking it, I ran the firefox binary. I right clicked on something to "Save As", and the highlighted default name would change immediately upon keystrokes. So no, it is only an issue in the snap.

Revision history for this message
pvillela (pvillela) wrote :

This issue is more widespread, also affecting at least these other applications: VSCode and Typora.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
David Fontenot (font21) wrote :

I upgraded to Ubuntu 22.04 yesterday and this bug now affects me.

Also, I have Mint Linux (20.3) Cinnamon (5.2.7) on another machine and its been like that since day 1 of the install.

In both versions of the operating system, when using a browser to right-click a file and "save as", the Save As Dialogue box does not get focus. This means, you can't just type the name of the file you want, you have to force focus on the Save As Dialogue box to use it by clicking it.

Revision history for this message
David Fontenot (font21) wrote :

I forgot to add SYSTEM INFO:

$ cat /proc/version
Linux version 5.15.0-46-generic (buildd@lcy02-amd64-115) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022

$ uname -r
5.15.0-46-generic

$ hostnamectl | grep Kernel
Kernel: Linux 5.15.0-46-generic

$ sudo lscpu
Architecture: x86_64
  CPU op-mode(s): 32-bit, 64-bit
  Address sizes: 39 bits physical, 48 bits virtual
  Byte Order: Little Endian
CPU(s): 8
  On-line CPU(s) list: 0-7
Vendor ID: GenuineIntel
  Model name: Intel(R) Core(TM) i7-7700T CPU @ 2.90GHz

Revision history for this message
Pedro Serrano (kpiq) wrote (last edit ):

Happens since I upgraded to Ubuntu 22.04. I can force focus on the Save As dialog, hit <Ctrl-L> to be able to rename my download, but the focus doesn't stay on the file name and instead - after typing a character - the focus switches to a search field inside the Save As dialog.

root@pswsl01:~# uname -a
Linux pswsl01 5.18.10-76051810-generic #202207071639~1659403207~22.04~cb5f582~dev-Ubuntu SMP PREEMPT_DY x86_64 x86_64 x86_64 GNU/Linux

root@pswsl01:~# cat /proc/version
Linux version 5.18.10-76051810-generic (buildd@lcy02-amd64-047) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #202207071639~1659403207~22.04~cb5f582~dev-Ubuntu SMP PREEMPT_DY

root@pswsl01:~# lscpu
Architecture: x86_64
  CPU op-mode(s): 32-bit, 64-bit
  Address sizes: 48 bits physical, 48 bits virtual
  Byte Order: Little Endian
CPU(s): 12
  On-line CPU(s) list: 0-11
Vendor ID: AuthenticAMD
  Model name: AMD Ryzen 5 5500U with Radeon Graphics
    CPU family: 23
    Model: 104
    Thread(s) per core: 2
    Core(s) per socket: 6
    Socket(s): 1
    Stepping: 1

root@pswsl01:~# snap list
Name Version Rev Tracking Publisher Notes
airshark 0.4 3 latest/stable pd -
bare 1.0 5 latest/stable canonical✓ base
chromium 105.0.5195.52 2076 latest/stable canonical✓ -
core 16-2.56.2 13425 latest/stable canonical✓ core
core18 20220706 2538 latest/stable canonical✓ base
core20 20220805 1611 latest/stable canonical✓ base
firefox 104.0.1-1 1775 latest/stable mozilla✓ -
gh 2.6.0-15-g1a10fd5a 502 latest/stable casper-dcl -
gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 161 latest/stable canonical✓ -
gnome-3-34-1804 0+git.3556cb3 77 latest/stable/… canonical✓ -
gnome-3-38-2004 0+git.891e5bc 115 latest/stable canonical✓ -
gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ -
signal-desktop 5.52.0 392 latest/stable snapcrafters -
snap-store 3.38.0-66-gbd5b8f7 558 latest/stable/… canonical✓ -
snapd 2.56.2 16292 latest/stable canonical✓ snapd

Changed in firefox:
status: Unknown → New
Revision history for this message
G.M. (sexxxenator) wrote :

Still there in Ubuntu 22.04 / Firefox 104.0.2 (from snap) ....
Also, Dialog box does not respect the Dark Theme configured in FF...

Revision history for this message
G.M. (sexxxenator) wrote :

In the end, both problems (SaveDialog focus & bad theming) were due to the use of snap version of firefox. Installing the .deb from PPA resolved both :
https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04

Why on earth Ubuntu decided to use snap?

Revision history for this message
Paddy Landau (paddy-landau) wrote :

Re comment #27

It's NOT only snap. This also happens to me with:

• The flatpak version of Firefox
• The Appimage version of Firefox
• Chrome installed from the official Chrome PPA

I have seen confirmation of this from others.

Thus Snap, Flatpak, Appimage and PPA are all affected.

Revision history for this message
vanadium (ftack) wrote :

See the four year old bug mentioned here: https://github.com/flatpak/xdg-desktop-portal-gtk/issues/137

Revision history for this message
Peter Klausner (peter-a-klausner) wrote :

For 22.04, I can additionally confirm the problem for Vivaldi's save dialog.
Whereas the seemingly identical dialog in LibreOffice works as intended.

Revision history for this message
iPadGuy (ipad-guy-100) wrote (last edit ):

I just upgraded from Ubuntu 20.04 to 22.04.1, and this bug now affects me.

I first encountered it in Brave Browser, then tested Google Chrome, and Telegram Desktop, and none will let me enter a filename--instead, it jumps to the filter box, and clears the directory. As a workaround, I am able to type the filename in another window that accepts text input, and copy/paste it into the Save As dialog.

How can a bug like this even make it into production?

Revision history for this message
Birk Bremer (bbremer) wrote :

Seems to be a gtk4 issue. The package maintainer of gtk4 would have to update his package...
https://gitlab.gnome.org/GNOME/gtk/-/issues/4798

Revision history for this message
Symax (ayourk) wrote :

I've read about this issue over in the GTK4 area and came across this patch that I intend to test. I retrieved this patch from https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4674/ and applied it to the 4.6.6 sources available from https://launchpad.net/ubuntu/jammy/amd64/libgtk-4-1/4.6.6+ds-0ubuntu1. I'm running into problems building it.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "FileChooser-Save_fix" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Jeremy Bícha (jbicha) wrote :

@Symax, that patch is already included in Ubuntu 22.10 but I still experience this issue there so that patch doesn't actually fix this issue.

Revision history for this message
kowach (kowach) wrote :

Same with upload dialog and it does not remembers last directory. It always starts from home directory.

Ubuntu Mate 22.04.1 LTS

Revision history for this message
Peter Klausner (peter-a-klausner) wrote :

This bug is mighty annoying. E.g. you can't simply type <ESC> to get out of the save dialog, if you wrongly typed <CTRL-S>. You first need to mouse the pointer to the text field.

Jeremy Bícha (jbicha)
no longer affects: chromium-browser (Ubuntu Jammy)
no longer affects: chromium-browser (Ubuntu Kinetic)
no longer affects: firefox (Ubuntu Jammy)
no longer affects: firefox (Ubuntu Kinetic)
no longer affects: gnome-shell (Ubuntu Jammy)
no longer affects: gnome-shell (Ubuntu Kinetic)
no longer affects: xdg-desktop-portal-gnome (Ubuntu Jammy)
no longer affects: xdg-desktop-portal-gnome (Ubuntu Kinetic)
no longer affects: xdg-desktop-portal-gtk (Ubuntu Jammy)
no longer affects: xdg-desktop-portal-gtk (Ubuntu Kinetic)
Changed in gtk4 (Ubuntu):
status: Confirmed → Fix Released
Changed in gtk4 (Ubuntu Jammy):
importance: Undecided → Medium
status: New → Triaged
Changed in gtk4 (Ubuntu Kinetic):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Olivier (obeltrando) wrote :

Hello,
also impacted here :)
Ubuntu 22.04 + a few different Window Manager (my main is i3wm, and here is the initial investigation: https://github.com/i3/i3/issues/5059)
Programs affected by the issue are Firefox and Chromium.

On this thread a temporary workaround has been found for Firefox while waiting for the fix
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1968887
set the `widget.use-xdg-desktop-portal.file-picker` to `0` in the `about:config` in Firefox.

Thanks in advance for the work :)
Cheers

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

See also bug 1878076

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+3.0 (Ubuntu Jammy):
status: New → Confirmed
Changed in gtk+3.0 (Ubuntu Kinetic):
status: New → Confirmed
Revision history for this message
Thomas Løcke (thomas-granvej6-deactivatedaccount) wrote :

This annoying bug rears its ugly head since I upgraded my own and my wifes computer to Ubuntu 22.04. This does not happen on my 18.04 laptop or 20.04 workbox.

When using the Save As dialog, focus switches to the filter/search field in the dialog when we start typing a name for the file. The focus change happens after each character, so it's practically unusable.

Confirmed with Firefox (snap), Google Chrome (PPA) and Brave (snap).

Revision history for this message
ADFH (adfh) wrote :

I see that there's an upstream patch that's apparently pending. Do we know when that'll make it into the distro? Will it enter 22.04 LTS or miss it?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like you mean https://gitlab.gnome.org/GNOME/gtk/-/issues/4880 .. If that does fix this issue then it will be in GTK 4.7.2/4.8.0 and later, which is already in Ubuntu 22.10 and later. But that requires apps to use GTK4 instead of GTK3 in order to get the fix.

So no there is no definite plan for this bug, but Ubuntu 22.04 is supported for another 9 years so never say never.

Changed in gtk4 (Ubuntu Kinetic):
status: Triaged → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also be careful to not get confused with bug 1878076.

Revision history for this message
ADFH (adfh) wrote :

Ahh.. Perhaps they have been conflated the two somewhere in amongst all the tickets here marked as duplicates. I'm talking about the bug where focus remains on browser window, rather than file dialog, requiring pointer device interaction to target the newly opened file dialog... as opposed to focus within the file dialog being unusual (which also seems to be a thing).

This issue (file dialog not focused when launched from browser) is arguably an accessibility issue as well, if a pointing device is required to control file dialogs where previously it could be driven by kbd alone.

tags: added: a11y
Revision history for this message
In , Lissyx+mozillians (lissyx+mozillians) wrote :

Heather, is this still happening ? This UI is the XDG Desktop Portal, so if there is still a bug there it needs to be fixed upstream. THere is https://launchpad.net/bugs/1949340 which was fixed in december. Can you confirm if it is fixed on an uptodate system ?

Revision history for this message
In , Heather Ellsworth (hellsworth) wrote :

Hi Alexandre, I just tried on a fresh 20.04.6 vm and the issue is no longer present.

To test this, I had to `apt purge firefox && snap install firefox` which installed 111.0-2. xdg-desktop-portals is at version 1.6.0-1ubuntu2.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
https://iso.qa.ubuntu.com/qatracker/reports/bugs/1949340

tags: added: iso-testing
Changed in gtk:
status: Unknown → Fix Released
Revision history for this message
Islam (islam) wrote :

It is different issue than the one reported in #44.

So if the fix is released for Kinetic, when it should be available in the repository for upgrade?

Changed in firefox:
status: New → Invalid
Revision history for this message
Alex Robinson (alex-launchpad-tranzoa) wrote :

On an Ubuntu 22.04 (newly updated from 18.04) box I got Firefox and Chromium browser back to using the good, system SaveAs dialog box instead of the horrid (((search box focus grabber and almost impossible to change file name from the default))) dialog box by doing this:

sudo snap install snapd

This version of snapd, 2.38.3, apparently overrides the apt-installed snapd version 2.38.

That the snap version of snapd wasn't installed ("snap list" did not list it) was the glaring difference between the bad box and a laptop that did not have the problem.

I should note: widget.use-xdg-desktop-portal.file-picker needs to be put back to the default, 2, from 0.

Revision history for this message
Peter Klausner (peter-a-klausner) wrote :

Recent Ubuntu 22.04.2 LTS, libgtk-4-common 4.6.6+ds-0ubuntu1, libgtk-3-common 3.24.33-1ubuntu2, vivaldi-stable 5.7.2921.65-1

'Save as' dialog now works as expected: focus is on filename keyboard entry, <ESC> immediately closes dialog.

BAD regression:
Vivaldi window is frozen after that. Does not happen with other distros, cf https://forum.vivaldi.net/topic/85488/bug-saving-a-web-page-freezes-browser-window

This is since about 1 week now. As I got used to mousing my way around the previous bug, I did not immediately notice the changed behaviour. Except the browser hang, of course.

Revision history for this message
Lancillotto (antonio-petricca) wrote :

SAme for me.

Revision history for this message
thomas (thomas-heuer) wrote :

Why is this bug a duplicate of https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1968887 ?

It should definitely be the other way around, since it does not only affect chromium but all programs using the Gnome shell file-save dialog.

Revision history for this message
thomas (thomas-heuer) wrote :

Is there any progress on this one? It completely disrupts workflows and is the single most annoying bug in the Gnome shell since a few years.

tags: added: fixed-in-gtk-4.6.7 fixed-in-gtk-4.7.2 fixed-upstream
Revision history for this message
satyaarth chhabra (satyaarthchhabra) wrote :

i faced the same issue and here is a workaround to it

Revision history for this message
satyaarth chhabra (satyaarthchhabra) wrote :
Revision history for this message
thomas (thomas-heuer) wrote :

Is there any progress on this issue? (Progress as in: works for end-users as it did the last 20 years…)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's not mentioned in the changelog but it looks like a fix for 22.04 will arrive with:
https://launchpad.net/ubuntu/+source/gtk4/4.6.9+ds-0ubuntu0.22.04.1

no longer affects: gnome-shell (Ubuntu)
Changed in gtk4 (Ubuntu Jammy):
status: Triaged → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm not sure we need so many "Confirmed" tasks at the top of this page. It's misleading if most of them are not required to fix the bug, but we'll be more confident that it's fixed for most people when GTK 4.6.9 is released to Ubuntu 22.04.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix released to jammy-updates for gtk4. Is that enough or are apps still using gtk3?

Changed in gtk4 (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Islam (islam) wrote (last edit ):

What about a fix for Lunar and Mantic Minotaur ?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Lunar and Mantic never had the bug (in gtk4). So if you still have issues then it sounds like gtk3.

no longer affects: gtk+3.0 (Ubuntu Kinetic)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks like it would be the same root cause introduced in GTK 3.24.19:

https://gitlab.gnome.org/GNOME/gtk/-/commit/f18eef7e6faab4730ab16d46f4b12f7004815558

Revision history for this message
Yu Yang Lin Hou (laifs) wrote :

I experience this in 23.04. When I save on Chrome, focus is not on the filename textfield. I can tab twice to get the focus on the textfield, for instance. Updated from 22.10 and 22.04 to try to get rid of it, all had the same issue. 18.04 and 20.04 didnt. Maybe related is that the right-click Open Terminal in a directory also doesn't focus on the terminal. I switched from Wayland to Xorg because I couldn't drag and drop files onto Chrome.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry I completely forgot that our web browsers are not using the Ubuntu archive versions of GTK so tracking the GTK packages here is a little misleading.

It looks like the next steps are:

1. *Someone* needs to propose a fix upstream for GTK 3.24.

2. Our snaps need to be updated to get the fix (gnome-42-2204, chromium, firefox).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.