File tree 1 file changed +5
-10
lines changed
src/librustdoc/html/static/js
1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -522,13 +522,10 @@ function preLoadCss(cssUrl) {
522
522
* @param {KeyboardEvent } ev
523
523
*/
524
524
function handleEscape ( ev ) {
525
- // @ts -expect-error
526
- searchState . clearInputTimeout ( ) ;
527
- // @ts -expect-error
528
- searchState . hideResults ( ) ;
525
+ window . searchState . clearInputTimeout ( ) ;
526
+ window . searchState . hideResults ( ) ;
529
527
ev . preventDefault ( ) ;
530
- // @ts -expect-error
531
- searchState . defocus ( ) ;
528
+ window . searchState . defocus ( ) ;
532
529
window . hideAllModals ( true ) ; // true = reset focus for tooltips
533
530
}
534
531
@@ -563,8 +560,7 @@ function preLoadCss(cssUrl) {
563
560
case "S" :
564
561
case "/" :
565
562
ev . preventDefault ( ) ;
566
- // @ts -expect-error
567
- searchState . focus ( ) ;
563
+ window . searchState . focus ( ) ;
568
564
break ;
569
565
570
566
case "+" :
@@ -1699,8 +1695,7 @@ function preLoadCss(cssUrl) {
1699
1695
addSidebarCrates ( ) ;
1700
1696
onHashChange ( null ) ;
1701
1697
window . addEventListener ( "hashchange" , onHashChange ) ;
1702
- // @ts -expect-error
1703
- searchState . setup ( ) ;
1698
+ window . searchState . setup ( ) ;
1704
1699
} ( ) ) ;
1705
1700
1706
1701
// Hide, show, and resize the sidebar
You can’t perform that action at this time.
0 commit comments