From f994352ab9e2ba9d3103e3eb3bd38a317f194612 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 6 Feb 2007 09:44:20 +0000 Subject: [PATCH] Addresses #532, Highlight collections containing item(s) when pressing alt/option - Don't trigger other keyboard shortcuts twice - Fix SQL error if item appears in no collections --- chrome/content/zotero/overlay.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 4e6236ac5..315fdc1c4 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -244,6 +244,8 @@ var ZoteroPane = new function() } ZoteroPane.collectionsView.setHighlightedRows(); } + + return; } // Ignore keystrokes if Zotero pane is closed @@ -322,7 +324,7 @@ var ZoteroPane = new function() */ function setHighlightedRowsCallback() { var itemIDs = ZoteroPane.getSelectedItems(true); - if (itemIDs) { + if (itemIDs && itemIDs.length) { var collectionIDs = Zotero.Collections.getCollectionsContainingItems(itemIDs, true); if (collectionIDs) { ZoteroPane.collectionsView.setHighlightedRows(collectionIDs);