From 99ab42a6747a8422ec4124577aafc35c9eb2ae60 Mon Sep 17 00:00:00 2001 From: Bogdan Abaev Date: Fri, 12 Jan 2024 16:57:10 -0500 Subject: [PATCH] Prevent trash row from receiving focus on Enter in filter box Prevent trash/duplicated/unfiled/etc. rows from getting focused on Enter if it is the currently selected collection row that technically passes the filter and Enter is pressed. --- chrome/content/zotero/collectionTree.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/content/zotero/collectionTree.jsx b/chrome/content/zotero/collectionTree.jsx index e9d517db76..44ededb2b6 100644 --- a/chrome/content/zotero/collectionTree.jsx +++ b/chrome/content/zotero/collectionTree.jsx @@ -2491,6 +2491,9 @@ var CollectionTree = class CollectionTree extends LibraryTree { focusedRowMatchesFilter() { let row = this.getRow(this.selection.focused); + if (row.isDuplicates() || row.isUnfiled() || row.isRetracted() || row.isTrash() || row.isPublications()) { + return false; + } return this._matchesFilter(row.ref).matchesFilter; }