From b047f3d9038116f52e734210b4679d64d2978c98 Mon Sep 17 00:00:00 2001 From: abaevbog Date: Fri, 1 Mar 2024 00:46:09 -0500 Subject: [PATCH] itemBox: ensure the grippy is hidden if <2 authors (#3735) When contextmenu closes, it clears visibility style from all components. It is added temporarily so that the options buttons do not disappear if the mouse leaves the row. The visibility setting for the grippy for items with only one author should be in a separate class so that grippy is not displayed by accident. Fixes: zotero#3732 --- chrome/content/zotero/elements/itemBox.js | 2 +- scss/elements/_itemBox.scss | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/elements/itemBox.js b/chrome/content/zotero/elements/itemBox.js index 31d49a069b..8471d4cc92 100644 --- a/chrome/content/zotero/elements/itemBox.js +++ b/chrome/content/zotero/elements/itemBox.js @@ -1004,7 +1004,7 @@ // If not editable or only 1 creator row, hide grippy if (!this.editable || this.item.numCreators() < 2) { - grippy.style.visibility = 'hidden'; + grippy.classList.add("single-creator-grippy"); grippy.setAttribute('disabled', true); } diff --git a/scss/elements/_itemBox.scss b/scss/elements/_itemBox.scss index 0c040e57b1..b47d62b3e9 100644 --- a/scss/elements/_itemBox.scss +++ b/scss/elements/_itemBox.scss @@ -69,6 +69,11 @@ item-box { padding: 0 !important; } + // Do not display grippy if there is only one creator + .meta-label > .single-creator-grippy { + visibility: hidden !important; + } + textarea { font: inherit; resize: none;