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 500946 - Focus does not return to item view after opening a location with Ctrl+L
Focus does not return to item view after opening a location with Ctrl+L
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Keyboardability
2.20.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-01 23:36 UTC by Robin Stocker
Modified: 2008-07-07 07:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Patch to implement grab_focus for icon view (4.42 KB, patch)
2008-07-04 11:34 UTC, Nelson Benitez
none Details | Review

Description Robin Stocker 2007-12-01 23:36:44 UTC
Steps to reproduce:
1. Press Ctrl+L
2. Enter a path to a directory
3. Press return (the contents of the directory are shown)
4. Start typing a name of a file/directory in there

You will notice that the usual "type start of name" don't work, and neither do the arrow keys. It seems the focus is not on the contents.

Other information:
I tried fixing this by adding gtk_widget_grab_focus in various places, but I couldn't find the right widget to focus. It should be a one line change.
Comment 1 Nelson Benitez 2008-06-27 10:33:51 UTC
I could only confirm this bug for nautilus browser windows + icon view... 

All rest combinations seems to work fine,,e.g. spatial window + icon view, browser window + list view...
Comment 2 Robin Stocker 2008-06-27 12:34:24 UTC
Yes, I use browser mode and icon view. Sorry for not providing this information up-front.
Comment 3 Nelson Benitez 2008-07-04 11:29:51 UTC
The same bug occurs when you escape the location entry dialog.

Steps to reproduce:
1. Press Ctrl+L
2. Enter a path to a directory
3. Press escape (action is cancelled)
4. Start typing a name of a file/directory in there

Result:
You will notice that the usual "type start of name" don't work, and neither do
the arrow keys. It seems the focus is not on the contents.
Comment 4 Nelson Benitez 2008-07-04 11:34:42 UTC
Created attachment 113976 [details] [review]
Patch to implement grab_focus for icon view

Hi, the patch fixes the problem by implementing grab_focus iface method in the icon view, so when we call nautilus_view_grab_focus() on a icon view the view gets properly focused. The grab_focus is also called for the Escape case.
Comment 5 Robin Stocker 2008-07-04 21:55:30 UTC
I tested the patch with a nautilus checkout of branches/gnome-2-22 (not trunk because for 2-22 I already had the dependencies) and it worked, thanks very much! So I'd say the fix can be committed.
Comment 6 Christian Neumair 2008-07-06 10:39:11 UTC
Thanks for your efforts, I've committed a different patch to trunk - but in the spirit of your's:

http://svn.gnome.org/viewvc/nautilus?view=revision&revision=14323

The idea is that we do not just remember the view widget, but any widget that was focused before temporarily showing a location bar.
Comment 7 Nelson Benitez 2008-07-07 07:27:35 UTC
Thank you Christian! , and thank you Robin for filing the bug and testing the patch!