From 836a6db9d2710ddad724454f8a9f79ce283e7104 Mon Sep 17 00:00:00 2001 From: kek7198 Date: Mon, 6 Dec 2021 21:37:11 -0600 Subject: [PATCH] fix --- files/assets/js/mobile_navigation_bar.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/files/assets/js/mobile_navigation_bar.js b/files/assets/js/mobile_navigation_bar.js index 64763bd81..3acec90a9 100644 --- a/files/assets/js/mobile_navigation_bar.js +++ b/files/assets/js/mobile_navigation_bar.js @@ -8,18 +8,14 @@ document.getElementsByTagName('body')[0].onscroll = () => { // var navbar = document.getElementById("navbar"); if (bottomBar != null) { - if (currentScrollPos <= 60) { + if (currentScrollPos <= 60 || (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 100)) { bottomBar.style.transform = "translateY(60px)"; console.log('test 2') } - else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 100)) { + else if (prevScrollpos > currentScrollPos) { bottomBar.style.transform = "translateY(0px)" console.log('test 1') } - else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 100)) { - bottomBar.style.transform = "translateY(60px)" - console.log('test 3') - } else { bottomBar.style.transform = "translateY(60px)" console.log('test 4')