tbkeys
tbkeys copied to clipboard
Sometimes builtin keybindings can still trigger
I have noticed that occasionally when holding j
or k
the builtin junk or ignore thread bindings will get triggered for a message as the selection is moving through the message list. I am not sure there is a good way to stop this. It must be a race condition between the tbkeys trigger and the builtin trigger. tbkeys could go in and unset the builtin binding but that requires using more of the internal Thunderbird API and I would like to use as little as possible. Currently, tbkeys' code mostly just injects mousetrap into the global context and then sets whichever bindings the user requests without much Thunderbird-specific code otherwise.
It seems that this behaviour is back with the most recent version of Thunderbird (115). At least I can't use the commands that are given in the wiki for scrolling the message ("window.document.getElementById('messagepane').contentDocument.documentElement.getElementsByTagName('body')[0].scrollBy(0, 40)",). This does scroll the message, but it also marks the message as junk.
@eyolf
Some of the common key bindings need to be updated. I got the following commands working in Thunderbird 115.
window.document.getElementById('tabmail-tabs').advanceSelectedTab(1, true);
window.document.getElementById('tabmail-tabs').advanceSelectedTab(-1, true);
window.gTabmail.tabContainer.advanceSelectedTab(1, true);
window.gTabmail.tabContainer.advanceSelectedTab(-1, true);
window.CloseTabOrWindow();
window.gTabmail.closeTab();
window.document.getElementById('threadTree'); // null
window.gTabmail.currentAbout3Pane.document.getElementById('threadTree').scrollByLines; // undefined
window.gTabmail.currentAbout3Pane.document.getElementById('threadTree').scrollBy(0, 26 * 1);
window.gTabmail.currentAbout3Pane.document.getElementById('threadTree').scrollBy(0, 26 * -1);
window.gTabmail.currentAbout3Pane.threadTree.scrollBy(0, window.gTabmail.currentAbout3Pane.threadTree._rowElementClass.ROW_HEIGHT * 1);
window.gTabmail.currentAbout3Pane.threadTree.scrollBy(0, window.gTabmail.currentAbout3Pane.threadTree._rowElementClass.ROW_HEIGHT * -1);
window.document.getElementById('messagepane'); // null
window.gTabmail.currentAboutMessage.document.getElementById('messagepane').contentWindow.scrollBy(0, 100);
window.gTabmail.currentAboutMessage.document.getElementById('messagepane').contentWindow.scrollBy(0, -100);
window.gTabmail.currentAboutMessage.getMessagePaneBrowser().contentWindow.scrollBy(0, 100);
window.gTabmail.currentAboutMessage.getMessagePaneBrowser().contentWindow.scrollBy(0, -100);
window.goDoCommand('cmd_newFolder');
window.openSubscriptionsDialog(window.GetSelectedMsgFolders()[0]);
Mozilla is gradually removing xul elements like tree from their email client.
I believe the scrollByLines method has been removed since the #threadTree selector isn't a tree element anymore. I posted an alternative using the scrollBy method. My row height is 26px. Your row height may be different.
About new mail front end http://developer.thunderbird.net/thunderbird-development/codebase-overview/mail-front-end http://developer.thunderbird.net/add-ons/updating/tb115/adapt-to-changes-in-thunderbird-103-115