From bbdfebf8f6410b90123001b40e6451140aad6233 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 6 Feb 2016 15:20:02 -0500 Subject: [PATCH] Avoid repeated search when clearing quick search bar --- chrome/content/zotero/zoteroPane.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 7a4107587..48e9c2ac6 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1967,8 +1967,10 @@ var ZoteroPane = new function() }); + /** + * Some keys trigger an immediate search + */ this.handleSearchKeypress = function (textbox, event) { - // Events that turn find-as-you-type on if (event.keyCode == event.DOM_VK_ESCAPE) { textbox.value = ''; this.search(); @@ -1980,12 +1982,7 @@ var ZoteroPane = new function() this.handleSearchInput = function (textbox, event) { - // This is the new length, except, it seems, when the change is a - // result of Undo or Redo - if (!textbox.value.length) { - this.search(); - } - else if (textbox.value.indexOf('"') != -1) { + if (textbox.value.indexOf('"') != -1) { this.setItemsPaneMessage(Zotero.getString('advancedSearchMode')); } }