commit c9beb5b45a0cefd956203b4a818c2dcdfd3dece1
parent 9d7cc849cdd924901dd491e067f11086f93d0f58
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 1 Nov 2012 04:23:43 -0400
Fix "Paste" menu item in Add Item By Identifier context menu
Fixes #58
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git 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
@@ -142,7 +142,7 @@
<toolbarbutton id="zotero-tb-item-from-page" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newItemFromPage.label;" command="cmd_zotero_newItemFromCurrentPage"/>
<toolbarbutton id="zotero-tb-lookup" class="zotero-tb-button" tooltiptext="&zotero.toolbar.lookup.label;" type="panel">
<panel id="zotero-lookup-panel" type="arrow" onpopupshown="Zotero_Lookup.onShowing()"
- onpopuphidden="Zotero_Lookup.onHidden()">
+ onpopuphidden="Zotero_Lookup.onHidden(event)">
<vbox>
<description>&zotero.lookup.description;</description>
<stack>