url/doi/options icon does not occupy space unless hovered (#3631)
url/doi/options do not occupy space unless the row is focused or hovered. This does not apply to options icons after multiline fields because it would shrink textarea on hover and shift text in an awkward way. Fixes: #3612
This commit is contained in:
parent
0985362829
commit
8bcf1d446a
1 changed files with 6 additions and 1 deletions
|
@ -639,6 +639,11 @@
|
|||
|| Zotero.ItemFields.isFieldOfBase(fieldID, 'publicationTitle'))) {
|
||||
let optionsButton = document.createXULElement("toolbarbutton");
|
||||
optionsButton.className = "zotero-clicky zotero-clicky-options show-on-hover";
|
||||
// Options button after single-line fields will not occupy space unless hovered.
|
||||
// This does not apply to multiline fields because it would move textarea on hover.
|
||||
if (!(Zotero.ItemFields.isLong(fieldName) || Zotero.ItemFields.isMultiline(fieldName))) {
|
||||
optionsButton.classList.add("no-display");
|
||||
}
|
||||
optionsButton.setAttribute("ztabindex", ++this._ztabindex);
|
||||
optionsButton.setAttribute('data-l10n-id', "itembox-button-options");
|
||||
// eslint-disable-next-line no-loop-func
|
||||
|
@ -1450,7 +1455,7 @@
|
|||
return null;
|
||||
}
|
||||
let openLink = document.createXULElement("toolbarbutton");
|
||||
openLink.className = "zotero-clicky zotero-clicky-open-link show-on-hover";
|
||||
openLink.className = "zotero-clicky zotero-clicky-open-link show-on-hover no-display";
|
||||
openLink.addEventListener("click", event => ZoteroPane.loadURI(value, event));
|
||||
openLink.addEventListener('keypress', event => this.handleKeyPress(event));
|
||||
openLink.setAttribute("ztabindex", ++this._ztabindex);
|
||||
|
|
Loading…
Reference in a new issue