From fa0b08da6f6483688aa847654a1cbec08dc09365 Mon Sep 17 00:00:00 2001 From: MoritzWeber0 Date: Sat, 18 Oct 2025 16:50:47 +0200 Subject: [PATCH] fix: Generalize scroll-handling to touches on mobile --- assets/js/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/search.js b/assets/js/search.js index 35f2ed52..82331109 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -27,9 +27,9 @@ const initSearch = () => { }, }); - // Close keyboard when scrolling in search results (mobile only) + // Close keyboard when touching search results (mobile only) const searchDrawer = search.querySelector(".pagefind-ui__drawer"); - searchDrawer.addEventListener("scroll", () => { + searchDrawer.addEventListener("touchstart", () => { if (!isMobile) return; if (document.activeElement && document.activeElement.blur) { document.activeElement.blur();