fix(mobile): add workaround on chrome

This commit is contained in:
Matthieu Bessat 2024-03-16 01:34:56 +01:00
parent 0e353a2be2
commit 57ebc4fb45

View file

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