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 540107 - deleting an item moves the focus wrongly when using the icon view
deleting an item moves the focus wrongly when using the icon view
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Views: Icon View
2.23.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 345150 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-06-25 07:36 UTC by Sebastien Bacher
Modified: 2008-10-13 12:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Patch for this issue (442 bytes, patch)
2008-06-26 13:17 UTC, Nelson Benitez
committed Details | Review

Description Sebastien Bacher 2008-06-25 07:36:11 UTC
the bug has been described on https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/242732

"How to reprodruce:

Open Nautilus, create a new directory called test, enter the directory, create two files test1.txt and test2.txt.

Now it is possible to use arrows on keyboard to move between the two files (only one is selected at a moment). Use DEL key to delete test1.txt.

The listing of files now shows only test2.txt. The file is "unselected".

Expected behaviour:

It should be possible to use keyboard to select the single remaining file test2.txt (e.g. pressing a space bar or using any arrow key or pg down/up) or the file should be "selected" as default.

Bug:

It is not possible to select the remaining file test2.txt with keyboard only. The only solution is to start typing "tes" or click on the file with a mouse.

(If more than one file remains, the arrow keys work as expected.)"
Comment 1 Nelson Benitez 2008-06-26 13:17:18 UTC
Created attachment 113459 [details] [review]
Patch for this issue

Hi, this was an easy fix, hope the reporter enjoy the fix :)
Comment 2 Christian Neumair 2008-06-28 11:04:41 UTC
Thanks, good job!

This patch also improves keynav if the file at the very end or beginning is selected but does not have keyboard focus, and you move towards the window edge. It will give keyboard focus to the selected icon.

Please commit the patch to trunk and to the GNOME 2.22 branch.
Comment 3 Nelson Benitez 2008-06-28 17:52:57 UTC
Sorry, I'm afraid I don't have commit access.
Comment 4 A. Walton 2008-06-28 18:13:04 UTC
Committed on your behalf, thanks again!!

2008-06-28  A. Walton  <awalton@gnome.org>

	* libnautilus-private/nautilus-icon-container.c
	(keyboard_arrow_key):
	Move keyboard focus correctly after a file has been
	removed. Patch thanks to Nelson Benitez. Closes bug #540107.
Comment 5 Nelson Benitez 2008-10-13 12:29:29 UTC
*** Bug 345150 has been marked as a duplicate of this bug. ***