theme: avoid initial scrolling in print #268

This commit is contained in:
Sören Weber 2022-06-07 20:24:53 +02:00
parent b0812bb28e
commit cc08c9f3df
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -552,6 +552,10 @@ function initToc(){
t.addEventListener( 'click', showToc ); t.addEventListener( 'click', showToc );
p.addEventListener( 'click', showToc ); p.addEventListener( 'click', showToc );
} }
// finally give initial focus to allow keyboard scrolling in FF
document.querySelector( '#body-inner' ).focus();
psc && psc.scrollbarY.focus();
} }
function initSwipeHandler(){ function initSwipeHandler(){
@ -768,10 +772,6 @@ jQuery(function() {
jQuery('[data-nav-id="' + url + '"]').addClass('visited'); jQuery('[data-nav-id="' + url + '"]').addClass('visited');
} }
} }
// finally give initial focus to allow keyboard scrolling in FF
document.querySelector( '#body-inner' ).focus();
psc && psc.scrollbarY.focus();
}); });
jQuery.extend({ jQuery.extend({