Fix "Paste" menu item in Add Item By Identifier context menu

Fixes #58
This commit is contained in:
Dan Stillman 2012-11-01 04:23:43 -04:00
parent 9d7cc849cd
commit c9beb5b45a
2 changed files with 5 additions and 3 deletions

View file

@ -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 = "";
}
}
}

View file

@ -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>