Ignore sort keyboard shortcuts in non-library tabs

Fixes #4140
This commit is contained in:
Abe Jellinek 2024-05-20 10:34:13 -04:00
parent 7fa7cf310e
commit eed7acff08

View file

@ -1638,7 +1638,11 @@ var ZoteroPane = new function()
let key = sortSubmenuKeys.children[i];
key.setAttribute('modifiers', Zotero.isMac ? 'accel alt control' : 'alt');
key.setAttribute('key', (i + 1) % 10);
key.addEventListener('command', () => ZoteroPane.itemsView.toggleSort(i, true));
key.addEventListener('command', () => {
if (Zotero_Tabs.selectedType === 'library') {
ZoteroPane.itemsView.toggleSort(i, true);
}
});
}
}
catch (e) {