This is an automated email from the ASF dual-hosted git repository.
sk0x50 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-website.git
The following commit(s) were added to refs/heads/master by this push:
new c96b3e4a2b IGNITE-28328 Fix Ignite2 docs search button initialization
(#326)
c96b3e4a2b is described below
commit c96b3e4a2bb40f503167e5d052aaac59696dad0c
Author: Alexey Alexandrov <[email protected]>
AuthorDate: Fri Mar 20 19:58:39 2026 +0200
IGNITE-28328 Fix Ignite2 docs search button initialization (#326)
---
_docs/assets/js/search.js | 6 +++++-
assets/js/search.js | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/_docs/assets/js/search.js b/_docs/assets/js/search.js
index 0891fed646..cadca62600 100644
--- a/_docs/assets/js/search.js
+++ b/_docs/assets/js/search.js
@@ -1,7 +1,11 @@
document.addEventListener("DOMContentLoaded", () => {
const searchButton = document.getElementById("search-button");
const searchWrapper = document.getElementById("search-wrapper");
- const searchInput = document.querySelector(".pagefind-ui__search-input");
+
+ if (!searchButton || !searchWrapper) return;
+ if (searchButton.dataset.searchInit === "true") return;
+
+ searchButton.dataset.searchInit = "true";
searchButton.addEventListener("click", () => {
searchButton.classList.toggle("open");
diff --git a/assets/js/search.js b/assets/js/search.js
index 0891fed646..cadca62600 100644
--- a/assets/js/search.js
+++ b/assets/js/search.js
@@ -1,7 +1,11 @@
document.addEventListener("DOMContentLoaded", () => {
const searchButton = document.getElementById("search-button");
const searchWrapper = document.getElementById("search-wrapper");
- const searchInput = document.querySelector(".pagefind-ui__search-input");
+
+ if (!searchButton || !searchWrapper) return;
+ if (searchButton.dataset.searchInit === "true") return;
+
+ searchButton.dataset.searchInit = "true";
searchButton.addEventListener("click", () => {
searchButton.classList.toggle("open");