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

Ctrl-a (Select All) shortcut key no longer working in version 5.8 #160

Closed
nicoschl opened this issue Feb 16, 2023 · 10 comments
Closed

Ctrl-a (Select All) shortcut key no longer working in version 5.8 #160

nicoschl opened this issue Feb 16, 2023 · 10 comments
Assignees
Labels

Comments

@nicoschl
Copy link

The shortcut key ctrl-a (select all) has stopped working since the new update 5.8.

Previously you could click on a message and press ctrl-a to select all the messages, this no longer works. The select all messages from the menu have also stopped working. Edit -> Select -> All.

This behaviour seems to be confirmed by 2 reviews on the add on homepage:
https://addons.thunderbird.net/en-us/thunderbird/addon/quickfilters/reviews/1171143/
https://addons.thunderbird.net/en-us/thunderbird/addon/quickfilters/reviews/1171141/

Disabling this add on restores the functionality.

Thunderbird 102.7.1
Linux Pop!_OS 22.04 LTS

@nmadani
Copy link

nmadani commented Feb 16, 2023

I have the same problem with TB 102.7.2 and TB 102.8.0 on macOS Big Sur and Windows 11.

@MichiFr
Copy link

MichiFr commented Feb 17, 2023

Just noticed the same here on my side after updating to the latest version as of today.

Disabling the add-on fixes this behaviour!
Windows 10, TB latest version.

@RealRaven2000
Copy link
Owner

I will test that today (was at the hospital yesterday) - I am sure it's easy to fix!

@MichiFr
Copy link

MichiFr commented Feb 17, 2023

I will test that today (was at the hospital yesterday) - I am sure it's easy to fix!

Thanks and hope you're well, Axel 👍

@RealRaven2000 RealRaven2000 self-assigned this Feb 17, 2023
RealRaven2000 added a commit that referenced this issue Feb 17, 2023
@RealRaven2000
Copy link
Owner

I have done a few code checks without success. Done the following steps with the same problem still manifesting.
1 - disable all the code in the key listener (it returns immediately, without checking for the quickFIlters shortcuts)
2 - added the parameter "passive: true" to make sure the original event cannot be repressed by any calls to event.preventDefault
3 - set the capture parameter from true to false - this way any underlying elements can still capture the event afterwards. (It probably doesn't make much difference as the listener is on the global windows level)

    if (!main.isKeyListener) {
      win.quickFilters_keyListener = (event) => { main.windowKeyPress(event,'down'); }
      win.addEventListener("keypress", win.quickFilters_keyListener, {capture:false, passive: true})    
      win.quickFilters.isKeyListener = true;
    }

the only (main) difference to the old code in quickFilters 5.6 (not 5.7!) is that I am passing the function quickFilters_keyListener to the addEventListener() call; this is in order to be able to remove the event listener when quickFilters stops or is uninstalled. Nevertheless I am going to test now whether it is 5.7 that introduced the problem already.

@RealRaven2000
Copy link
Owner

Checked and with basically the same code in 5.7.1 the issue doesn't happen.

Old code:

quickFilters.addKeyListener = function(win) {
  const prefs = quickFilters.Preferences;
  let isRunFolderKey = prefs.isShortcut("folder"),
      isSelectedMailsKey = prefs.isShortcut("mails");
      
  if (isRunFolderKey || isSelectedMailsKey) {
    // check main instance 
    let main = win.quickFilters;
    if (!main.isKeyListener) {
      win.quickFilters_keyListener = (event) => { main.windowKeyPress(event,'down'); }
      win.addEventListener("keypress", win.quickFilters_keyListener, true)    
      win.quickFilters.isKeyListener = true;
    }
  }
};

this also uses main.windowKeyPress() - main is the quickFilters object of the main window (3pane window). In fact this complete function in 5.8 is unchanged. Also the function windowKeyPress() is unchanged! So it must be something within the scope that has changed.

Not quite sure what else (that's relevant) may have changed (just yet) ... mysterious..

@RealRaven2000
Copy link
Owner

I think I found the problem after couple hours of looking at the wrong places. I found there was actually an error thrown in error console (should have looked there 1st, I usually do). the wrapped doCommand() function needed a 2nd parameter (aTab) which made the command in mail3PaneWindowCommands.js fail:

https://searchfox.org/comm-esr102/rev/68a40ae7eec56b5c562209fba62b80e7c9c18ffe/mail/base/content/mail3PaneWindowCommands.js#1090

interestingly this file is (currently) removed in the latest code branch (which is going to land in Tb115 later this year). So there will be a lot of rewriting for that version ... not sure what is going to replace command handlers in the new version, but I will add some patches for #138 (beta version) later.

New version for testing:

quickFilters-wx-5.8.1pre7.zip

to install this version as always, first download the zip file. Then drag this zip file into Thunderbird Add-ons Manager (or install from file via the tools menu). Do not extract contents as zip = xpi. same internal file structure!

@nmadani
Copy link

nmadani commented Feb 17, 2023

Thank you. Using TB 1028.0 on macOS Big Sur, QF 5.8.1pre7.zip restored the select-all function.

@wsh2git
Copy link

wsh2git commented Feb 17, 2023

QuickFilters.Pro version 5.8.1pre7
Working for me!.. {big smile}
Cheers. Respectfully, Bill.
Windows Thunderbird 102.8.0 (32bit)

@RealRaven2000
Copy link
Owner

Fixed in 5.8.1 published on 18/02/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

5 participants