Skip to content

Commit fa0b08d

Browse files
committed
fix: Generalize scroll-handling to touches on mobile
1 parent a53b506 commit fa0b08d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

assets/js/search.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ const initSearch = () => {
2727
},
2828
});
2929

30-
// Close keyboard when scrolling in search results (mobile only)
30+
// Close keyboard when touching search results (mobile only)
3131
const searchDrawer = search.querySelector(".pagefind-ui__drawer");
32-
searchDrawer.addEventListener("scroll", () => {
32+
searchDrawer.addEventListener("touchstart", () => {
3333
if (!isMobile) return;
3434
if (document.activeElement && document.activeElement.blur) {
3535
document.activeElement.blur();

0 commit comments

Comments
 (0)