fix(mobile): add workaround on chrome
This commit is contained in:
parent
0e353a2be2
commit
57ebc4fb45
1 changed files with 8 additions and 8 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue