From f346bff4d44711fe8dd113e352d4b5c6e92319da Mon Sep 17 00:00:00 2001 From: Said Achmiz Date: Sat, 15 Feb 2020 11:13:37 -0500 Subject: [PATCH] Fixed bug with nav UI hiding on mobile --- .htaccess | 3 ++- assets/js/script.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.htaccess b/.htaccess index c414742..11c8e68 100644 --- a/.htaccess +++ b/.htaccess @@ -1,6 +1,7 @@ AddCharset utf-8 .shtml .html .css .php .txt .js - +# Disable caching of CSS and JS (for testing only). + Header set Cache-Control "max-age=0, public" diff --git a/assets/js/script.js b/assets/js/script.js index ba8227d..e611719 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -402,12 +402,12 @@ function updateSiteNavUIState(event) { // On desktop, show site nav UI when scrolling a full page up, or to the // the top of the page. - // On mobile, show site nav UI translucent on ANY scroll up. + // On mobile, show site nav UI on ANY scroll up. if (GW.mediaQueries.mobileNarrow.matches) { - if (GW.scrollState.unbrokenUpScrollDistance > 0) + if (GW.scrollState.unbrokenUpScrollDistance > 0 || GW.scrollState.lastScrollTop <= 0) showSiteNavUI(); } else if ( GW.scrollState.unbrokenUpScrollDistance > window.innerHeight - || GW.scrollState.lastScrollTop == 0) { + || GW.scrollState.lastScrollTop == 0) { showSiteNavUI(); } }