! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[bug] Detailed list view: When file is deleted, focus does not stay on the ne...
Status:
RESOLVED: FIXED

Comments

Description teal 2013-02-22 15:16:17 CET
Scenario:

1. Locate a directory with a lot of files (so that vertical scrollbar appears)
2. Navigate to a file somewhere in the middle of the list (for better illustration of the probelm scroll to the middle of the list and choose a file displayed somewhere in the middle of a display)
3. Delete this file using keyboard key ('Delete').

Expected result: file should be deleted and focus (by focus I mean the blue line highlighting the currently selected file) shift to the nearest remaining file (typically file above the deleted one)

Actual result: focus disappears, and when you press 'Up' or 'Down' key, list of files is scrolled to the beginning of the list and focus appears on the first file in the list.

The problem appeared in Thunar 1.6. In older version (for example in 1.2.3) the result of a file deletion was as expected.
Comment 1 Jeff Shipley 2013-07-23 23:53:42 CEST
In 1.6.2, Thunar is behaving the way you expect.

If I select a file, press delete, and then press an arrow key, the adjacent file is then selected.
Comment 2 Profpatsch 2013-07-24 11:07:25 CEST
% pacman -Q thunar 
thunar 1.6.3-1

Sorry, it’s not.
Comment 3 Jeff Shipley 2013-07-24 18:58:07 CEST
I also tried it against thunar built from master and from the 1.6.3 package. It seems to work as expected.

Profpatsch: What version of gtk do you have installed? I have 2.24.10.
Comment 4 Profpatsch 2013-07-25 12:32:28 CEST
% pacman -Q gtk2                                             :(
gtk2 2.24.20-1

% pacman -Q gtk3
gtk3 3.8.2-1
Comment 5 Jeff Shipley 2013-07-29 23:06:44 CEST
I did some more testing for this with Thunar 1.6.3. This does not happen (for me) in the Icon View or the Compact List View, but does happen in the Detailed List View.
Comment 6 Profpatsch 2013-07-30 12:56:34 CEST
Hm, but I am in Detailed List View.
Comment 7 Jeff Shipley 2013-07-30 17:10:45 CEST
Sorry, I mixed it up. It works in Compact List, not in Detailed List, just as you said.
Comment 8 Richard Baxter 2014-07-09 05:29:31 CEST
This bug appears directly related to https://bugzilla.xfce.org/show_bug.cgi?id=10558 "when renaming a file the selected file does not follow the renamed file (or so it seems)"
Comment 9 Harald Judt editbugs 2015-04-17 17:29:10 CEST
*** Bug 11640 has been marked as a duplicate of this bug. ***
Comment 10 Narrat 2015-05-15 12:13:03 CEST
Not exactly sure if I'm fitting here, but my problem seems similar (symbolic view)

Sometimes on deletion (also had on copy and paste actions) thunar jumps the displayed view


Testbed: Folder with many files (a need to scroll)

If I'm in this folder and then the files appear, thunar behaves like it should (or on a new session and first entry). File gets deleted, window position doesn't jump.
Moving a folder up and then back, Thunar jumps to the last saved (scrollbar-)position. If I now delete files thunar jumps back to this saved position.
Comment 11 Narrat 2015-05-15 12:17:00 CEST
Hmm.. it appears to me I should have posted this in #10756

Sorry for the noise
Comment 12 Julien [nodiscc] editbugs 2015-05-23 01:58:59 CEST
Moved from bug 10306

>I built against gtk3
>When you delete a file in the middle of a long list, with the delete key, in "detailed list view", and then press the arrow keys to move to a next position in the list, the cursor jumps to the very top of the window, and you have to scroll all the way down again to where you were at the moment of the deletion.

>I propose that after deleting the cursor in the list should jump to the previous item.

I can confirm this happens in Detailed List view in Thunar 1.6.3-2 on Debian
Comment 13 Julien [nodiscc] editbugs 2015-05-23 01:59:19 CEST
*** Bug 10306 has been marked as a duplicate of this bug. ***
Comment 14 optional, but encouraged 2015-07-20 13:30:19 CEST
This bug is still there in 1.6.10 , extremely annoying when doing actual file management.
Comment 15 beelze 2016-05-09 20:48:35 CEST
Confirming this bug in 1.6.10 in detailed view mode: after deletion pressing Up/Down resets position to beginning. Yes, it's very annoying.
Comment 16 Ikonta 2016-05-09 20:54:48 CEST
Thunar-1.6.10.
After deletion a file resetting point to the first item makes Thunar poorly usable with keyboard interface, especially in the mid-end of large file list.
Comment 17 weyfonk 2016-09-13 11:58:47 CEST
Created attachment 6836 
Restore focus on nearest remaining file after deletion when using detailed list view

Hi all,
Please feel free to let me know if this fixes the issue for you, and how to possibly improve it.

Thanks!
Comment 18 Profpatsch 2016-09-14 22:05:55 CEST
> Please feel free to let me know if this fixes the issue for you, and how to possibly improve it.

It fixes the bug that it loses focus completely, but it’s not yet how I would expect it to behave:

Right now if it looks like
1
2 
3
Comment 19 Profpatsch 2016-09-14 22:08:30 CEST
Sorry, hit save too early. Again:

> Please feel free to let me know if this fixes the issue for you, and how to possibly improve it.


It fixes the bug that it loses focus completely, but it’s not yet how I would expect it to behave:

Right now if it looks like
1
2 << 
3

when I delete 2 the result is

1 <
3

It jumps back on entry and loses full focus, having only a hollow focus.

As a user I often want to delete multiple consecutive files one after the other, so my expected result would be:

1
3 <<

with a full focus on 3, so I can directly handle the next file.
Comment 20 weyfonk 2016-09-15 19:25:00 CEST
Created attachment 6843 
Restore focus on nearest file *after* deleted files

Sorry, you are right, the previous patch would focus the nearest file _before_ the deleted file(s), instead of the one after. This patch should fix this.

> and loses full focus, having only a hollow focus.

This is the way Thunar currently works in icons and compact list views, which is why I've kept this behaviour. 
Incidentally, I find it more intuitive: a hollow selection makes it clearer to me that files have been deleted, especially in a folder with a large number of files and when simply trashing files (which, contrary to permanent deletion, does not trigger a warning pop-up). Of course, this is just my personal preference and irrelevant here, but I guess it _might_ be a reason why it was done this way in the first place.
Comment 21 Profpatsch 2016-09-16 14:16:01 CEST
The position problem is fixed, if the hollow markings are thunar default behaviour I think this issue is fixed. :+1:
Comment 22 Michał Górny 2016-11-02 08:23:20 CET
Ping. Could someone review the patch, please?
Comment 23 Filipe Rosset 2016-11-04 21:36:18 CET
(In reply to Michał Górny from comment #22)
> Ping. Could someone review the patch, please?

Hi guys, I can confirm this patch #6843 is working as expected on top of Thunar-1.6.10

I applied the patch and recorded a video showing the issue fixed: 
https://filiperosset.fedorapeople.org/rawhide/video-bug-9870.mkv.tar.gz

[filiperosset@rosset-laptop ~]$ rpm -q Thunar
Thunar-1.6.10-7.fc26.x86_64
[filiperosset@rosset-laptop ~]$ rpm -q gtk2
gtk2-2.24.31-2.fc25.x86_64
[filiperosset@rosset-laptop ~]$ rpm -q gtk3
gtk3-3.22.2-1.fc25.x86_64
Comment 24 alexxcons editbugs 2018-01-30 22:51:14 CET
Sorry for the late replay and thanks for the patch !

Actually I just wanted to test and possibly apply the patch .. however it looks like thunar-master already handles the use-case correct without the patch.

I have no glue why this is the case.

I can however reproduce the problem with thunar 1.6.13
Comment 25 alexxcons editbugs 2018-01-31 21:52:50 CET
When applied to 1.6.13 the patch lacks some features which the current master has ... e.g. keeping the focus on the last file.
In the patch no file is focused after delete. First up/down has to be pressed to regain focus and delete the next file .. that's a bit irritating. And still a beep sound is played.

Since master does not suffer from this bug,  I will close the report now. Hopefully we can release thunar 1.8 soon.

Bug #9870

Reported by:
teal
Reported on: 2013-02-22
Last modified on: 2018-01-31
Duplicates (2):
  • 10306 [enh, usability] selection jumps to first item after file deletion
  • 11640 Detailed List View: Delete File does not save Position / moves Selection to first Item (1.6.4)

People

Assignee:
Jannis Pohlmann
CC List:
17 users

Version

Version:
unspecified

Attachments

Additional information