! 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 !
Scroll position jumps to marked item
Status:
RESOLVED: FIXED

Comments

Description duelle 2015-04-25 17:13:54 CEST
Steps to reproduce:
1. Open a folder that contains more files than can be displayed (=> scrollbar present)
2. Mark the last file in folder
3. Slowly scroll towards the top (e.g., using mouse wheel)

In my case the scroll position jumps back to the marked file at the bottom.
Similar "jumping" effects occured when marking all files in a scrollable folder.

When rolling back thunar v1.6.6 the problem does not occur at all.

If there is any more information I can provide, just let me know.
Comment 1 hapical 2015-04-27 22:56:39 CEST
That happens to me too, but only when tumblerd is working on the current folder 

If all the thumbnails has been building before, everything is ok.
Comment 2 Lionel 2015-04-28 00:55:58 CEST
Can confirm with thunar 1.6.7 in arch linux.
Comment 3 Harald Judt editbugs 2015-04-29 22:45:49 CEST
Yes, this is annoying. The tumblerd hint is quite valuable, maybe it can help with debugging.
Comment 4 Harald Judt editbugs 2015-05-01 12:22:03 CEST
Tracked it down, it is caused by http://git.xfce.org/xfce/thunar/commit/?id=4d19f45feb198b3a580ef2f777e2c50be2e3a0d3:

commit 4d19f45feb198b3a580ef2f777e2c50be2e3a0d3
Author: Harald Judt <h.judt@gmx.at>
Date:   Tue Mar 31 22:05:22 2015 +0200

    Restore selection on row changes too (bug #9886)

Despite the commit message, this does not exactly fix bug #9886 (which has been fixed by a separate commit), but it deals with related issues, e.g. when renaming files and their position in the view changes (for all views).

Fixing both issues is not quite trivial, need much more time looking into this.
Comment 5 Harald Judt editbugs 2015-05-01 12:28:46 CEST
On second thought, the model emits a "rows-reordered" signal which from a quick glance is not processed by any views. Calling the selection-restore code from there might be a better idea.
Comment 6 Harald Judt editbugs 2015-05-01 13:27:38 CEST
Created attachment 6226 
call-selection-restore-only-when-rows-reordered-signal-is-received.patch

For a start, this patch should fix most issues.
Comment 7 Harald Judt editbugs 2015-05-01 15:22:59 CEST
Created attachment 6227 
keep-the-scroll-position-when-restoring-the-file-selection.patch

Test case:

1) mkdir test
2) cd test
3) while true; do for i in a aa aaa b bb bbb c d e eee ff gg kk lll l x y g h i zz z u uu uuu xxxxx cb; do touch "$i"; sleep 1; done; done
4) open thunar window for this dir, switch ordering to modification date
5) make sure the window is not big enough to show all files
6) select a file and watch

Behaviour without the patch: View always tries to keep the selected file in the visible area.

Behaviour with the patch: View will not try to keep the selected file in the visible area.

I hope this patch has no bad side-effects for operations. In that case, one could still call scroll_to_file manually.

Bug #11855

Reported by:
duelle
Reported on: 2015-04-25
Last modified on: 2015-05-03

People

Assignee:
Xfce Bug Triage
CC List:
5 users

Version

Attachments

Additional information