toc: improve keyboard handling #390

This commit is contained in:
Sören Weber 2022-11-17 17:45:29 +01:00
parent dd44547a10
commit 17d877a141
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -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{