From 767234081956dd7e2afa826005dec4e9eea73f12 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 2 Sep 2021 20:24:16 -0400 Subject: [PATCH] HTML tree: Don't select all items on Cmd-Shift-A --- chrome/content/zotero/components/virtualized-table.jsx | 10 +++++++--- chrome/content/zotero/itemTree.jsx | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index 5ffd876dad..0b9f75816c 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -558,10 +558,14 @@ class VirtualizedTable extends React.Component { this._jsWindow.scrollTo(this._jsWindow.scrollOffset + this._jsWindow.getWindowHeight() - this._rowHeight); } break; - + + // Select All case "a": - // i.e. if CTRL/CMD pressed down - if (movePivot && this.props.multiSelect) this.selection.rangedSelect(0, this.props.getRowCount()-1, false, true); + if (this.props.multiSelect + && !e.shiftKey + && (Zotero.isMac ? (e.metaKey && !e.ctrlKey) : e.ctrlKey)) { + this.selection.rangedSelect(0, this.props.getRowCount()-1, false, true); + } break; case " ": diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index f6a5085ee9..f7ba5ad693 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -875,7 +875,10 @@ var ItemTree = class ItemTree extends LibraryTree { const _promise = Zotero.Tags.toggleItemsListTags(items, colorData.name); return false; } - else if (event.key == 'a' && (Zotero.isMac ? event.metaKey : event.ctrlKey)) { + else if (event.key == 'a' + && !event.altKey + && !event.shiftKey + && (Zotero.isMac ? (event.metaKey && !event.ctrlKey) : event.ctrlKey)) { if (!this.collectionTreeRow.isPublications()) { this.expandMatchParents(this._searchParentIDs); }