mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Auto focus main content for keyboard scrolling
This commit is contained in:
@@ -150,11 +150,18 @@ function initSearch() {
|
||||
}
|
||||
}
|
||||
|
||||
function pageFocus() {
|
||||
var mainContent = document.querySelector('.js-main-content');
|
||||
mainContent.focus();
|
||||
console.log(mainContent)
|
||||
}
|
||||
|
||||
|
||||
// Document ready
|
||||
|
||||
function ready(){
|
||||
toggleNav();
|
||||
pageFocus();
|
||||
if (typeof lunr !== 'undefined') {
|
||||
initSearch();
|
||||
}
|
||||
|
Reference in New Issue
Block a user