Fix error creating context menu for independent save button

This commit is contained in:
Dan Stillman 2016-11-20 03:01:41 -05:00
parent ce5328cbc4
commit 335c3d0b98

View file

@ -200,7 +200,7 @@ function addIcon() {
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
button.setAttribute('disabled', 'true');
button.setAttribute('type', 'menu-button');
let menupopup = document.createElementNS(kNSXUL, "menupopup");
let menupopup = button.ownerDocument.createElementNS(kNSXUL, "menupopup");
menupopup.setAttribute('onpopupshowing', "Zotero_Browser.onStatusPopupShowing(event)");
button.appendChild(menupopup);
}