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
This commit is contained in:
abaevbog 2024-03-01 00:46:09 -05:00 committed by GitHub
parent ea63780600
commit b047f3d903
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -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);
}

View file

@ -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;