Fix DOI View Online/Copy as URL regression

Was opening/copying the bare DOI, not the URL.
This commit is contained in:
Abe Jellinek 2024-01-29 13:18:13 -05:00 committed by Dan Stillman
parent fa6e6f9458
commit b8c1b7c139

View file

@ -592,6 +592,7 @@
valueElement.setAttribute('aria-labelledby', label.id);
}
let openLinkButton;
let link = val;
let addContextMenu = false;
// TEMP - NSF (homepage)
if ((fieldName == 'url' || fieldName == 'homepage')
@ -612,6 +613,7 @@
.replace(/%/g, '%25')
.replace(/"/g, '%22');
openLinkButton = this.createOpenLinkIcon(doi);
link = doi;
addContextMenu = true;
}
}
@ -622,7 +624,6 @@
rowData.appendChild(openLinkButton);
}
if (addContextMenu) {
let link = val;
rowData.oncontextmenu = (event) => {
this._linkMenu.dataset.link = link;
document.popupNode = rowLabel.parentElement;