Ticket #38476: 38476.8.patch
File 38476.8.patch, 1.3 KB (added by , 7 years ago) |
---|
-
src/wp-content/themes/twentyseventeen/assets/js/global.js
29 29 /** 30 30 * Ensure the sticky navigation doesn't cover current focused links 31 31 */ 32 $( ' #content a, #colophon a' ).focus( function() {32 $( '.site-content-contain a[href], .site-content-contain area[href], .site-content-contain input:not([disabled]), .site-content-contain select:not([disabled]), .site-content-contain textarea:not([disabled]), .site-content-contain button:not([disabled]), .site-content-contain iframe, .site-content-contain object, .site-content-contain embed, .site-content-contain [tabindex], .site-content-contain [contenteditable]' ).filter( ':visible' ).focus( function() { 33 33 if ( $navigation.hasClass( 'site-navigation-fixed' ) ) { 34 34 var windowScrollTop = $( window ).scrollTop(), 35 35 fixedNavHeight = $navigation.height(), … … 42 42 } 43 43 44 44 if ( offsetDiff < fixedNavHeight ) { 45 $( window ).scrollTo( itemScrollTop - ( fixedNavHeight + 50 ), 600);45 $( window ).scrollTo( itemScrollTop - ( fixedNavHeight + 50 ), 0); 46 46 } 47 47 } 48 48 } );