From c9beb5b45a0cefd956203b4a818c2dcdfd3dece1 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 1 Nov 2012 04:23:43 -0400 Subject: [PATCH] Fix "Paste" menu item in Add Item By Identifier context menu Fixes #58 --- chrome/content/zotero/lookup.js | 6 ++++-- chrome/content/zotero/zoteroPane.xul | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js index 84d062e8cf..eccf91703e 100644 --- a/chrome/content/zotero/lookup.js +++ b/chrome/content/zotero/lookup.js @@ -120,7 +120,9 @@ const Zotero_Lookup = new function () { /** * Cancels the popup and resets fields */ - this.onHidden = function() { - document.getElementById("zotero-lookup-textbox").value = ""; + this.onHidden = function(event) { + if (event.target.id == 'zotero-lookup-panel') { + document.getElementById("zotero-lookup-textbox").value = ""; + } } } diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul index 1f1b71eac3..45a0f29d33 100644 --- a/chrome/content/zotero/zoteroPane.xul +++ b/chrome/content/zotero/zoteroPane.xul @@ -142,7 +142,7 @@ + onpopuphidden="Zotero_Lookup.onHidden(event)"> &zotero.lookup.description;