mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
toc: improve keyboard handling #390
This commit is contained in:
parent
dd44547a10
commit
17d877a141
1 changed files with 2 additions and 0 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue