Skip to content

Commit

Permalink
toc: improve keyboard handling matcornic#390
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Nov 17, 2022
1 parent dd44547 commit 17d877a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions static/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ function showToc(){
b.classList.toggle( 'toc-flyout' );
if( b.classList.contains( 'toc-flyout' ) ){
pst && pst.update();
pst && pst.scrollbarY.focus();
document.querySelector( '.toc-wrapper ul a' ).focus();
document.addEventListener( 'keydown', tocEscapeHandler );
}
else{
Expand Down

0 comments on commit 17d877a

Please sign in to comment.