hiding fix?

This commit is contained in:
Patrick Schwarzer 2025-05-12 20:49:19 +02:00
parent 536e2fcacb
commit 2e91bd6b70

View file

@ -55,4 +55,13 @@ document.addEventListener("DOMContentLoaded", () => {
mobileNav.classList.remove("active");
}
})
document.addEventListener("touchstart", function(event) {
const isInsideMobileNav = mobileNav.contains(event.target);
const isClickToggle = mobileNavButton.contains(event.target);
if (!isInsideMobileNav && !isClickToggle){
mobileNav.classList.remove("active");
}
})
})