Guard against missing search elements and restyle search layout

This commit is contained in:
2026-05-26 14:05:26 -04:00
parent 8fdcdaf412
commit f2170e9ac8
2 changed files with 20 additions and 19 deletions
+2 -1
View File
@@ -4682,6 +4682,7 @@
function initSearch() {
const input = document.getElementById("search-input");
if (!input) return;
const caseBtn = document.getElementById("search-case-btn");
const wordBtn = document.getElementById("search-word-btn");
const regexBtn = document.getElementById("search-regex-btn");
@@ -4770,7 +4771,7 @@
SearchChips.init();
// Initially hide clear button
clearBtn.style.display = "none";
if (clearBtn) clearBtn.style.display = "none";
// --- Input handler: debounced search + autocomplete dropdown ---
input.addEventListener("input", () => {