mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 14:05:33 +08:00
theme: avoid initial scrolling in print #268
This commit is contained in:
parent
b0812bb28e
commit
cc08c9f3df
@ -552,6 +552,10 @@ function initToc(){
|
||||
t.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(){
|
||||
@ -768,10 +772,6 @@ jQuery(function() {
|
||||
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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user