From ad319b1b1f482790058becba78861649c696b820 Mon Sep 17 00:00:00 2001 From: "David A. Kennedy" Date: Mon, 24 Oct 2016 17:58:18 +0000 Subject: [PATCH] Twenty Seventeen: Fix smooth scrolling skip link The link was scrolling too far. The main problem was that the `menuTop` variable lost it's initial definition of `0`, so all future subtractions were failing. Props tywayne. Fixes #38448. git-svn-id: https://develop.svn.wordpress.org/trunk@38886 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyseventeen/assets/js/global.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyseventeen/assets/js/global.js b/src/wp-content/themes/twentyseventeen/assets/js/global.js index b4141c288e..14863b09ee 100644 --- a/src/wp-content/themes/twentyseventeen/assets/js/global.js +++ b/src/wp-content/themes/twentyseventeen/assets/js/global.js @@ -23,7 +23,7 @@ idealNavHeight, navIsNotTooTall, headerOffset, - menuTop, + menuTop = 0, resizeTimer; /** @@ -149,7 +149,7 @@ * 'Scroll Down' arrow in menu area */ if ( $( 'body' ).hasClass( 'admin-bar' ) ) { - menuTop = -32; + menuTop -= 32; } if ( $( 'body' ).hasClass( 'blog' ) ) { menuTop -= 30; // The div for latest posts has no space above content, add some to account for this