citation dlg: only do not hide X when search runs (#5116)

Instead, when the search runs, replace just the accept
button with the spinner.

Fixes: #5115
This commit is contained in:
abaevbog 2025-03-14 04:31:58 -07:00 • committed by GitHub
parent bbf91d65f9
commit a49e4e5449
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -243,11 +243,7 @@ class Layout {
async search(value, { skipDebounce = false } = {}) {
if (accepted) return;
_id("loading-spinner").setAttribute("status", "animate");
for (let node of _id("top-level-btn-group").childNodes) {
if (node.id !== "loading-spinner") {
node.hidden = true;
}
}
_id("accept-button").hidden = true;
SearchHandler.searching = true;
// search for selected/opened/cited items
// only enforce min query length in list mode
@ -284,9 +280,7 @@ class Layout {
SearchHandler.searching = false;
_id("loading-spinner").removeAttribute("status");
for (let node of _id("top-level-btn-group").childNodes) {
node.hidden = false;
}
_id("accept-button").hidden = false;
if (this.forceUpdateTablesAfterRefresh && this.type == "library") {
this.forceUpdateTablesAfterRefresh = false;
setTimeout(() => {