From 17d877a14182ca54f9f519270b263820f9f06eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Thu, 17 Nov 2022 17:45:29 +0100 Subject: [PATCH] toc: improve keyboard handling #390 --- static/js/theme.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/js/theme.js b/static/js/theme.js index 049d795fe4..8465cbdbd9 100644 --- a/static/js/theme.js +++ b/static/js/theme.js @@ -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{