Focus drops from search input in GtkFileChooserDialog after first character, which stops searching (broken behaviour)

Bug #1592177 reported by Wise Melon
52
This bug affects 7 people
Affects Status Importance Assigned to Milestone
GTK+
Expired
Medium
Ubuntu GNOME
New
Undecided
Unassigned
gtk+3.0 (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
Disco
Fix Released
Undecided
Unassigned

Bug Description

* Impact
The focus gets removed from the search entry widget in the fileselector while typing which makes it difficult to use

* Test case

Steps:
1. Open Gedit
2. Choose Open -> Other Documents... to open a GtkFileChooserDialog
3. Press on the search button next to Open
4. Type what you are searching for

Expected behaviour:
Focus remains in the search input until I finish typing then results come up

What happens instead:
Searching stops after I enter the first characters because focus is lost from the search input

* Regression potential

The change is desactivating/reactivating typeahead in the gtk fileselector, check that this feature keeps working as it should (keyboard navigate by typing the first chars of a file/folder, that should move the focus to the first matching item and allows to navigate by hitting enter)

------------------------------------

I have noticed that after upgrading to GNOME 3.20 on Ubuntu GNOME 16.04 that the built-in search functionality is almost impossible to use in the GTK file chooser (though it is the same one that allows you to save files as well as choose them).

So if one types something into the search, after they have typed the first letter it will immediately select the top search result meaning one has to re-select the search box, this happens for every letter so searching for a long string becomes very annoying. If one carries on typing once it has selected the top result and unselected the search box it will start searching in the other search which only looks at results.

Upstream bug:
https://gitlab.gnome.org/GNOME/gtk/issues/1572

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libgtk-3-0 3.22.30-1ubuntu1

Related branches

Revision history for this message
Tim Lunn (darkxst) wrote :

Can you file this upstream against gtk+

Changed in ubuntu-gnome:
milestone: none → yakkety
Revision history for this message
Wise Melon (wise-melon-deactivatedaccount) wrote :

Right, sorry, I was having some issues connecting to the upstream bugzilla, but all sorted now.

Changed in gtk:
importance: Unknown → Medium
status: Unknown → Confirmed
tags: added: yakkety
tags: added: gnome-3.18 gnome-3.22 zesty
Changed in gtk:
status: Confirmed → Incomplete
Changed in gtk:
status: Incomplete → Expired
Revision history for this message
Fernando (fmuro) wrote :

Still happening in Bionic. As suggested in the upstream bug report, this comes from the old Ubuntu patches to restore the type ahead behavior, which was removed upstream. Nautilus doesn't seem to be affected, it behaves like intended upstream. The file picker, though, is currently pretty broken in this sense, since neither full search nor type ahead behaves properly.

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
description: updated
summary: - Built-in search almost impossible to use in GTK file chooser
+ Focus drops from search input in GtkFileChooserDialog after first
+ character, which stops searching (broken behaviour)
Revision history for this message
Fernando (fmuro) wrote :

I'd say the solution is to remove the restore_filechooser_typeaheadfind.patch, see this commit:

https://git.launchpad.net/ubuntu/+source/gtk+3.0/commit/?id=99cb6330706eadb58bf9d3c5b77120fdd5971189

After all, such patches were removed from Nautilus for a good reason. It should also be removed from the file chooser, since currently it breaks both behaviors. Both search and type ahead are currently broken, by removing this, at least search will work, which is the upstream behavior.

Revision history for this message
Fernando (fmuro) wrote :

Forgot to say, I've attached a screencast which hopefully will attract the attention of someone able to fix this and to make a decision on how to proceed. As you can see, when searching, unless you type extremely fast, the first character is search and then the rest are dedicated to type-ahead, not achieving any of the desired results (type ahead starts with the second character).

tags: added: bionic
Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Here's my screencast as well:

https://launchpadlibrarian.net/397451009/Screencast%202018-11-13%2013%3A15%3A31.mp4

Sad that this seems to be an issue since 2016 which continues to exist.

Revision history for this message
Axel Meunier (axel-meunier) wrote :

I am also experiencing this bug. It should be noted that it does not happen in Fedora 29 (it is mentioned here by a F29 user : https://gitlab.gnome.org/GNOME/gtk/issues/1572 and I have also checked it myself) so it seems to be Ubuntu specific.

tags: added: rls-bb-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+3.0 - 3.24.5-1ubuntu2

---------------
gtk+3.0 (3.24.5-1ubuntu2) disco; urgency=medium

  * debian/patches/restore_filechooser_typeaheadfind.patch:
    - remove our patch to restore typeahead in the filechooser, when it
      was added back to the package the upstream code had no replacement,
      nowadays they trigger a search (which is also what nautilus does now).
      The patch was also buggy and creating focus issue in the search entry.
      (lp: #1818819, #1592177)

 -- Sebastien Bacher <email address hidden> Wed, 06 Mar 2019 13:46:50 +0100

Changed in gtk+3.0 (Ubuntu):
status: Confirmed → Fix Released
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks to Andrea who worked on a fix, SRU uploaded to cosmic and the fix is lined up next for a bionic SRU

Revision history for this message
Fernando (fmuro) wrote :

Any news on when this will land in bionic proposed?

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Seems as if this was partially fixed in disco, but when searching for a name with "firstname lastname", entering the space doesn't allow me to continue to search, but jumps into the first folder when "firstname" matches.

Desired result should be that entering a space allows me to continue to search for "lastname", and only hitting Enter would enter the directory.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Rainer, disco doesn't have the patch anymore, your issue seems a different one and likely and upstream one

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Wise, or anyone else affected,

Accepted gtk+3.0 into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gtk+3.0/3.24.4-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gtk+3.0 (Ubuntu Cosmic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Wise, or anyone else affected,

Accepted gtk+3.0 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gtk+3.0/3.22.30-1ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gtk+3.0 (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
tags: removed: rls-bb-incoming
Revision history for this message
Fernando (fmuro) wrote :

libgtk-3-0/bionic-proposed,now 3.22.30-1ubuntu3 amd64 [installed]

This fixes the problem, this means that clicking on the magnifier button I can search without the cursor jumping to the typeahead old behavior. Nevertheless, if I open a file dialog and start typing, the default behaviour is still typeahead. I do not whether this is intended or should also be fixed.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Fernando (fmuro) wrote :

Sorry, the bug is not fixed in snaps, but it is fixed in regular applications.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> Nevertheless, if I open a file dialog and start typing, the default behaviour is still typeahead. I do not whether this is intended or should also be fixed.

That's the intended behaviour, we don't want to change that in a stable serie but just fix the focus bug. Thanks for confirming the fix works as intended!

> Sorry, the bug is not fixed in snaps, but it is fixed in regular applications.

Right, that's because the gtk version in the snap platform doesn't include that fix yet

Revision history for this message
Fernando (fmuro) wrote :

Thanks for the info about snaps, I somehow thought that they get the file picker from the system, I don't really know how they work. Then, we keep the tag verification-done-bionic and I'll wait until this GTK fix arrives at snaps to test it. Thanks for your great work!

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Hi, I would like to be able to either add this new issue here found in disco or create a new ticket for it, but I don't know what package to file against.

Just like before, I opened Thunderbird to attach a file, and the file picker comes up. I type the first few characters of my search (eg. someone's firstname), and hit space to enter that person's lastname, but as soon as I hit space the search stops and jumps into the folder of the first person found. There is no way to continue searching after the space.

So, does this fit here, or do I need a new ticket? If the latter, what package?

Thanks.

PS: I've uploaded a new screencast (Screencast 2019-04-10 10:17:23.mp4) to help visualize this new problem.

tags: removed: yakkety zesty
Revision history for this message
Fernando (fmuro) wrote :

So when shall this hit the regular updates?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Tested on cosmic using 3.24.4-0ubuntu1.1, the focus is correctly saying in the text widget as described

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

@Sebastien: This is only partially correct - when searching for <firstname> <lastname>, hitting space in the search jumps to the fist occurrence of <firstname>, but what if you wanted another result? So entering <space> breaks the search.

The desired outcome would be that only <enter> would descend into the directory after the correct search result was found.

If <space> interrupts the search, the search is rather useless that way.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Rainer, that space thing is not what the bug was about nor an issue with the fix, I would say that you should probably open another report

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

@Sebastien - so what do I file a new report against then?

When typing: ubuntu-bug GtkFileChooserDialog
I get: dpkg-query: no packages found matching GtkFileChooserDialog

Any pointer?

Revision history for this message
Sebastien Bacher (seb128) wrote :

same as this one, gtk+3.0

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

This is what I get when typing ubuntu-bug gtk3-<tab>:

gtk3-engines-breeze gtk3-engines-xfce gtk3-nocsd
gtk3-engines-unico gtk3-im-libthai

So what do I pick?

tags: removed: verification-needed
Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

When you want to file a bug against a certain package, you type the name of the source package, which is gtk+3.0 here. You can find the name of a source package from its Launchpad page at the top under the Ubuntu title (here for example https://launchpad.net/ubuntu/+source/gtk+3.0).

So you run:
ubuntu-bug gtk+3.0

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

This bug was fixed in the package gtk+3.0 - 3.24.4-0ubuntu1.1

---------------
gtk+3.0 (3.24.4-0ubuntu1.1) cosmic; urgency=medium

  [ Andrea Azzarone ]
  * d/p/restore_filechooser_typeaheadfind.patch:
    - Disable typeahead if in search mode (LP: #1592177)

 -- Sebastien Bacher <email address hidden> Fri, 15 Mar 2019 21:26:23 +0100

Changed in gtk+3.0 (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for gtk+3.0 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package gtk+3.0 - 3.22.30-1ubuntu3

---------------
gtk+3.0 (3.22.30-1ubuntu3) bionic; urgency=medium

  [ Sebastien Bacher ]
  * d/p/Check-for-NULL-priv-popup_window-in-gtk_combo_box_popdown.patch:
    - Check for NULL priv->popup_window in gtk_combo_box_popdown()
    (lp: #1816032)

  [ Andrea Azzarone ]
  * d/p/restore_filechooser_typeaheadfind.patch:
    - Disable typeahead if in search mode (LP: #1592177)

 -- Sebastien Bacher <email address hidden> Tue, 02 Apr 2019 17:30:09 +0200

Changed in gtk+3.0 (Ubuntu Bionic):
status: Fix Committed → Fix Released
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.