File tree Expand file tree Collapse file tree 2 files changed +2
-28
lines changed Expand file tree Collapse file tree 2 files changed +2
-28
lines changed Original file line number Diff line number Diff line change @@ -344,28 +344,6 @@ function hideThemeButtonState() {
344
344
document . getElementsByTagName ( "body" ) [ 0 ] . style . marginTop = "" ;
345
345
}
346
346
347
- function isInSidebarElems ( elem ) {
348
- while ( elem ) {
349
- if ( elem . classList && elem . classList . contains ( "sidebar-elems" ) ) {
350
- return true ;
351
- }
352
- elem = elem . parentElement ;
353
- }
354
- return false ;
355
- }
356
-
357
- function handleSidebarElemsFocus ( e ) {
358
- if ( isInSidebarElems ( e . relatedTarget ) || isInSidebarElems ( document . activeElement ) ) {
359
- showSidebar ( ) ;
360
- }
361
- }
362
-
363
- function handleSidebarElemsBlur ( e ) {
364
- if ( ! isInSidebarElems ( e . relatedTarget ) ) {
365
- hideSidebar ( ) ;
366
- }
367
- }
368
-
369
347
var toggleAllDocsId = "toggle-all-docs" ;
370
348
var main = document . getElementById ( "main" ) ;
371
349
var savedHash = "" ;
@@ -680,11 +658,6 @@ function hideThemeButtonState() {
680
658
// `crates{version}.js` should always be loaded before this script, so we can use
681
659
// it safely.
682
660
addSidebarCrates ( window . ALL_CRATES ) ;
683
-
684
- onEachLazy ( sidebar . getElementsByTagName ( "a" ) , function ( a ) {
685
- a . onfocus = handleSidebarElemsFocus ;
686
- a . onblur = handleSidebarElemsBlur ;
687
- } ) ;
688
661
}
689
662
} ;
690
663
Original file line number Diff line number Diff line change @@ -1729,7 +1729,8 @@ details.undocumented[open] > summary::before {
1729
1729
width : calc (100% + 30px );
1730
1730
}
1731
1731
1732
- .show-it {
1732
+ .show-it , .sidebar-elems : focus-within {
1733
+ z-index : 2 ;
1733
1734
left : 0 ;
1734
1735
}
1735
1736
You can’t perform that action at this time.
0 commit comments