From 472ee720933cc66d22e3a292fbedb2d17002856c Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 30 Apr 2024 02:10:03 -0400 Subject: [PATCH] Fix column-sorting shortcuts on Windows (#4068) --- chrome/content/zotero/zoteroPane.js | 4 +--- chrome/content/zotero/zoteroPane.xhtml | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 374dcee358..9897af0b4f 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1627,12 +1627,10 @@ var ZoteroPane = new function() let sortSubmenuKeys = document.getElementById('sortSubmenuKeys'); for (let i = 0; i < 10; i++) { - let key = document.createElement('key'); - key.id = 'key_sortCol' + i; + let key = sortSubmenuKeys.children[i]; key.setAttribute('modifiers', Zotero.isMac ? 'accel alt control' : 'accel alt'); key.setAttribute('key', (i + 1) % 10); key.addEventListener('command', () => ZoteroPane.itemsView.toggleSort(i, true)); - sortSubmenuKeys.append(key); } } catch (e) { diff --git a/chrome/content/zotero/zoteroPane.xhtml b/chrome/content/zotero/zoteroPane.xhtml index 88a22fbd2d..69db59a741 100644 --- a/chrome/content/zotero/zoteroPane.xhtml +++ b/chrome/content/zotero/zoteroPane.xhtml @@ -191,7 +191,20 @@ - + + + + + + + + + + + + +