fx-compat: Fix clicking URL label

Now that it's a div rather than a label, have to use `textContent`
instead `nodeValue`
This commit is contained in:
Dan Stillman 2022-05-12 01:16:41 -04:00
parent d797734b38
commit 63634eed02

View file

@ -538,7 +538,7 @@
&& Zotero.Utilities.isHTTPURL(val, true)) { && Zotero.Utilities.isHTTPURL(val, true)) {
th.classList.add("pointer"); th.classList.add("pointer");
// TODO: make getFieldValue non-private and use below instead // TODO: make getFieldValue non-private and use below instead
th.setAttribute("onclick", "Zotero.launchURL(this.nextSibling.firstChild ? this.nextSibling.firstChild.nodeValue : this.nextSibling.value)"); th.setAttribute("onclick", "Zotero.launchURL(this.nextSibling.firstChild ? this.nextSibling.firstChild.textContent : this.nextSibling.value)");
th.setAttribute("tooltiptext", Zotero.getString('pane.item.viewOnline.tooltip')); th.setAttribute("tooltiptext", Zotero.getString('pane.item.viewOnline.tooltip'));
} }
else if (fieldName == 'DOI' && val && typeof val == 'string') { else if (fieldName == 'DOI' && val && typeof val == 'string') {