Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message list scrolls to top when switching folders #417

Closed
oreineke opened this issue Oct 13, 2023 · 15 comments
Closed

Message list scrolls to top when switching folders #417

oreineke opened this issue Oct 13, 2023 · 15 comments
Assignees
Labels

Comments

@oreineke
Copy link

oreineke commented Oct 13, 2023

With Quickfolders 6.2 on FF 115.3.2, when switching folders by clicking on a quick folders tab (same or different email account), in the selected folder the list of email messages often starts to scroll all the way to the top, unless you grab the scrollbar to stop it.

@RealRaven2000
Copy link
Owner

It should scroll to the folder to make it visible (not to the top). Sometimes it doesn't "quite" get there. Anyway will investigate.

@oreineke
Copy link
Author

It is not the folder pane that is scrolling, it is the email messages pane (i.e. the list with individual emails). It scrolls up through all my emails until it reaches the top of the email message list.

Maybe when switching folders via Quickfolders, the message pane tries to scroll to the message that was selected in the previous message pane - just a wild guess.

This wild scrolling does not happen if I select a folder trough the TB folder pane.

@oreineke
Copy link
Author

oreineke commented Oct 16, 2023

I also noted that the undesired scrolling in the message pane does not happen if you jump between quick folders using the "shift-j" shortcut.
It only happens when switching folders by clicking on the quick folders tabs.

@RealRaven2000
Copy link
Owner

On my system, it returns to the message that I had selected last time I visited the folder, so I cannot reproduce the behavior at them moment.

@oreineke
Copy link
Author

I found it is important to have a message selected before switching folders to cause the scrolling. Also, the folder I am switching to seems to must have a lot of messages in it to show the symptom (I have ~2.500 in one). Maybe it is an overflow issue in some kind of message id?

@oreineke
Copy link
Author

I found that the following code from quickfolders.js, Method "MySelectFolder" seems to be causing this issue:

    let doc = QuickFolders.Util.document3pane;
    if (doc) {
      doc.commandDispatcher.advanceFocus();
      doc.commandDispatcher.rewindFocus();
    }

If I disable one or both of the ...Focus() calls, the crazy scrolling never seems to happen.

@RealRaven2000
Copy link
Owner

I found that the following code from quickfolders.js, Method "MySelectFolder" seems to be causing this issue:

    let doc = QuickFolders.Util.document3pane;
    if (doc) {
      doc.commandDispatcher.advanceFocus();
      doc.commandDispatcher.rewindFocus();
    }

If I disable one or both of the ...Focus() calls, the crazy scrolling never seems to happen.

thanks for chasing this up. it's been a while since this code has been written, I hardly remember, but i guess it is related to scrolling the message into view. it may well be obsolete in Thunderbird 115. Note that I have folders with > 15,000 messages but I usually sort by Date descending. Maybe we can drop these lines altogether.

You can disable the whole piece of code by setting
extensions.quickfolders.autoFocusPreview = false
or through deactivating this setting:

image

come to think of it, it's switched off here. :)

@RealRaven2000
Copy link
Owner

Related (very old) bugs from the now decommissioned bugzilla which was hosted at mozdev.org:

https://quickfolders.org/bugzilla/bugs/show_bug.cgi@id=21808.html

that's all I could find, but obviously it's a very very old feature, as the bug is dated 2009 ...

@RealRaven2000
Copy link
Owner

RealRaven2000 commented Oct 16, 2023

OK, I am just playing with the feature a little while I am in the same 3pane tab (just switching between different folders and putting the mouse into the folder pane manually. It seems like it probably affects the focus into the thread list, but doesn't really affect scrolling or selecting messages. So if it is just about focusing the message pane (I guess so we can scroll it) then I may find a different way of doing that. The question is whether a particular message needs to be focused in order to enable "space-bar" navigation?

@RealRaven2000
Copy link
Owner

So I have looked at the oldest history, this is pretty much an option from one of the first versions of QuickFolders (1.0.1) which was released on 15/05/2009:

https://quickfolders.org/version-old.html#1.0

Either it's time to retire the feature or reimplement it?

@RealRaven2000
Copy link
Owner

RealRaven2000 commented Oct 17, 2023

Can you try the version below? I mainly removed the calls to commandDispatcher.advanceFocus() and commandDispatcher.rewindFocus() . I also added some debug log which you can enable via QF options / debug mode / right click debug mode:

image

by setting extensions.quickfolders.debug.folders.select = true there will be a little more detail in the Javascript console, as long as QuickFolders debug mode is activated.


QuickFolders-mx-6.3pre103.zip

To test the new version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install.

@oreineke
Copy link
Author

Thanks, the "QuickFolders-mx-6.3pre103.zip" test version does not show the unintended scrolling!
The message pane is not selected after switching folders, but that also did not work with the normal ESR115 Quickfolders release (with "Focus on message list when changing tab" option switched on). It seems to take 6 TAB presses to focus the message pane after switching folders, but also seems to depends on what other GUI elements are visible.

@RealRaven2000
Copy link
Owner

I have tried to improve the focusing of the message pane with the following version - I noticed that after focusing (which happens 200ms after clicking the QuickFolders Tab) the current mail is briefly selected but shortly after the focus goes elsewhere (not even know where it goes and how). But I added a longer delay (1000ms) and now it appears to work (for me). I highly recommend restarting Thunderbird after installing this version. Also enable "Focus on message list when changing tabs"

image

this will trigger the improved behavior..

QuickFolders-mx-6.3pre111.zip


To test the new version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 added a commit that referenced this issue Oct 18, 2023
…pup trigger, #417 excessive scrolling when selecting folder through tab
@oreineke
Copy link
Author

With QuickFolders-mx-6.3pre111.zip, the focus goes to the highlighted message in the list after 1sec for me also, nice!

@RealRaven2000
Copy link
Owner

Fixed in 6.3 - Published 30/10/2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants