Keep the dropdown hidden after search execution
This commit is contained in:
+4
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user