fx-compat: Open DOI popup as native menu, too

This commit is contained in:
Abe Jellinek 2022-08-01 14:29:35 -04:00
parent bcf62e688f
commit 812511e31b

View file

@ -578,8 +578,12 @@
th.classList.add("pointer"); th.classList.add("pointer");
th.addEventListener('click', event => ZoteroPane_Local.loadURI(doi, event)); th.addEventListener('click', event => ZoteroPane_Local.loadURI(doi, event));
th.setAttribute("tooltiptext", Zotero.getString('pane.item.viewOnline.tooltip')); th.setAttribute("tooltiptext", Zotero.getString('pane.item.viewOnline.tooltip'));
valueElement.oncontextmenu = () => { valueElement.oncontextmenu = (event) => {
this._id('zotero-doi-menu').openPopup(valueElement); this._id('zotero-doi-menu').openPopupAtScreen(
event.screenX + 1,
event.screenY + 1,
true
);
}; };
var openURLMenuItem = this._id('zotero-doi-menu-view-online'); var openURLMenuItem = this._id('zotero-doi-menu-view-online');