File tree 1 file changed +4
-9
lines changed
src/librustdoc/html/static/js
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -803,15 +803,10 @@ function loadCss(cssUrl) {
803
803
}
804
804
} ) ;
805
805
806
- function handleClick ( id , f ) {
807
- const elem = document . getElementById ( id ) ;
808
- if ( elem ) {
809
- elem . addEventListener ( "click" , f ) ;
810
- }
806
+ const mainElem = document . getElementById ( MAIN_ID ) ;
807
+ if ( mainElem ) {
808
+ mainElem . addEventListener ( "click" , hideSidebar ) ;
811
809
}
812
- handleClick ( MAIN_ID , ( ) => {
813
- hideSidebar ( ) ;
814
- } ) ;
815
810
816
811
onEachLazy ( document . querySelectorAll ( "a[href^='#']" ) , el => {
817
812
// For clicks on internal links (<A> tags with a hash property), we expand the section we're
@@ -945,7 +940,7 @@ function loadCss(cssUrl) {
945
940
return ;
946
941
}
947
942
if ( ! this . NOTABLE_FORCE_VISIBLE &&
948
- ! elemIsInParent ( event . relatedTarget , window . CURRENT_NOTABLE_ELEMENT ) ) {
943
+ ! elemIsInParent ( ev . relatedTarget , window . CURRENT_NOTABLE_ELEMENT ) ) {
949
944
hideNotable ( true ) ;
950
945
}
951
946
} ;
You can’t perform that action at this time.
0 commit comments