fix(mobile): add workaround on chrome
All checks were successful
Deploy workflow / deploy (push) Successful in 29s

This commit is contained in:
Matthieu Bessat 2024-03-16 01:34:56 +01:00
parent 43768183de
commit 388c4ed11e

View file

@ -46,16 +46,16 @@
const nav_button = document.getElementById("navi-toggle") const nav_button = document.getElementById("navi-toggle")
nav_button.addEventListener("change", event => { nav_button.addEventListener("change", event => {
if (event.target.checked) { if (event.target.checked) {
/*
document.documentElement.style.overflow = "hidden";
document.body.style.overflow = "hidden";
*/
} }
if (!event.target.checked) { if (!event.target.checked) {
/* setTimeout(() => {
document.documentElement.style.overflow = "initial"; document.documentElement.style.overflow = "hidden";
document.body.style.overflow = "initial"; document.body.style.overflow = "hidden";
*/ }, 800)
setTimeout(() => {
document.documentElement.style.overflow = "initial";
document.body.style.overflow = "initial";
}, 810)
} }
}) })
</script> </script>