From 586acbe9a16bfe2a088eb4965562495521f6fd63 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Wed, 27 May 2026 09:45:22 -0400 Subject: [PATCH] Keep the dropdown hidden after search execution --- frontend/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/app.js b/frontend/app.js index 0aaa643..183c068 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -440,6 +440,7 @@ /** Populate and show the dropdown with history, title suggestions, and tag suggestions */ async populate(inputValue, cursorPos) { + if (this._suppressNext) { this._suppressNext = false; return; } // Cancel previous suggestion request if (suggestAbortController) { suggestAbortController.abort(); @@ -466,6 +467,7 @@ } // Show/hide sections + this._historySection.hidden = historyItems.length === 0; this._titlesSection.hidden = true; this._tagsSection.hidden = true; const hasContent = historyItems.length > 0; @@ -6093,8 +6095,9 @@ const excl = document.getElementById("search-exclude-input"); if (excl) excl.value = s.exclude_paths; } - // Execute the search + // Execute the search — suppress dropdown from appearing AutocompleteDropdown.hide(); + AutocompleteDropdown._suppressNext = true; const vault = s.vault || "all"; if (input) { input.dispatchEvent(new Event("input")); } clearTimeout(searchTimeout);