mirror of
https://github.com/thangisme/notes.git
synced 2025-11-23 13:12:25 -05: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