Fix DOI field context menu not appearing after field edit
Context menu wouldn't appear again until the item box was refreshed
This commit is contained in:
parent
bb5fe45f31
commit
3d4b93c86a
1 changed files with 11 additions and 7 deletions
|
@ -600,13 +600,6 @@
|
|||
th.classList.add("pointer");
|
||||
th.addEventListener('click', event => ZoteroPane_Local.loadURI(doi, event));
|
||||
th.setAttribute('title', Zotero.getString('pane.item.viewOnline.tooltip'));
|
||||
valueElement.oncontextmenu = (event) => {
|
||||
this._id('zotero-doi-menu').openPopupAtScreen(
|
||||
event.screenX + 1,
|
||||
event.screenY + 1,
|
||||
true
|
||||
);
|
||||
};
|
||||
|
||||
var openURLMenuItem = this._id('zotero-doi-menu-view-online');
|
||||
openURLMenuItem.addEventListener('command', event => ZoteroPane_Local.loadURI(doi, event));
|
||||
|
@ -1447,6 +1440,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Add popup menu on DOI field with value
|
||||
if (fieldName == 'DOI' && valueText) {
|
||||
valueElement.oncontextmenu = (event) => {
|
||||
this._id('zotero-doi-menu').openPopupAtScreen(
|
||||
event.screenX + 1,
|
||||
event.screenY + 1,
|
||||
true
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
valueElement.textContent = valueText;
|
||||
|
||||
// Attempt to make bidi things work automatically:
|
||||
|
|
Loading…
Reference in a new issue