Guard against missing search elements and restyle search layout
This commit is contained in:
+2
-1
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user