GNOME Bugzilla – Bug 500946
Focus does not return to item view after opening a location with Ctrl+L
Last modified: 2008-07-07 07:27:35 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.
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...
Yes, I use browser mode and icon view. Sorry for not providing this information up-front.
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.
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.
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.
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.
Thank you Christian! , and thank you Robin for filing the bug and testing the patch!