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
f006995676
commit
5919f0e77a
1 changed files with 7 additions and 3 deletions
|
@ -440,9 +440,6 @@
|
|||
label.classList.add("pointer");
|
||||
label.addEventListener('click', event => ZoteroPane_Local.loadURI(doi, event));
|
||||
label.setAttribute("tooltiptext", Zotero.getString('pane.item.viewOnline.tooltip'));
|
||||
valueElement.oncontextmenu = () => {
|
||||
this._id('zotero-doi-menu').openPopup(valueElement);
|
||||
};
|
||||
|
||||
var openURLMenuItem = this._id('zotero-doi-menu-view-online');
|
||||
openURLMenuItem.addEventListener('command', event => ZoteroPane_Local.loadURI(doi, event));
|
||||
|
@ -1423,6 +1420,13 @@
|
|||
valueElement.setAttribute('flex', '1');
|
||||
}
|
||||
|
||||
// Add popup menu on DOI field with value
|
||||
if (fieldName == 'DOI' && valueText) {
|
||||
valueElement.oncontextmenu = () => {
|
||||
this._id('zotero-doi-menu').openPopup(valueElement);
|
||||
};
|
||||
}
|
||||
|
||||
var firstSpace = valueText.indexOf(" ");
|
||||
|
||||
// To support newlines in Abstract and Extra fields, use multiple
|
||||
|
|
Loading…
Reference in a new issue