diff --git a/files/assets/js/mobile_navigation_bar.js b/files/assets/js/mobile_navigation_bar.js index 82c4bc825..c9abbd815 100644 --- a/files/assets/js/mobile_navigation_bar.js +++ b/files/assets/js/mobile_navigation_bar.js @@ -8,13 +8,13 @@ document.getElementsByTagName('body')[0].onscroll = () => { // var navbar = document.getElementById("navbar"); if (bottomBar != null) { - if (prevScrollpos > currentScrollPos && (document.body.innerHeight + currentScrollPos) < (document.body.offsetHeight - 100)) { + if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 100)) { bottomBar.style.transform = "translateY(0px)" } - else if (currentScrollPos <= 60 && (document.body.innerHeight + currentScrollPos) < (document.body.offsetHeight - 100)) { + else if (currentScrollPos <= 60 && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 100)) { bottomBar.style.transform = "translateY(60px)"; } - else if (prevScrollpos > currentScrollPos && (document.body.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 100)) { + else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 100)) { bottomBar.style.transform = "translateY(0px)" } else {