File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
src/librustdoc/html/static/js Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -803,15 +803,10 @@ function loadCss(cssUrl) {
803803 }
804804 } ) ;
805805
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 ) ;
811809 }
812- handleClick ( MAIN_ID , ( ) => {
813- hideSidebar ( ) ;
814- } ) ;
815810
816811 onEachLazy ( document . querySelectorAll ( "a[href^='#']" ) , el => {
817812 // For clicks on internal links (<A> tags with a hash property), we expand the section we're
@@ -945,7 +940,7 @@ function loadCss(cssUrl) {
945940 return ;
946941 }
947942 if ( ! this . NOTABLE_FORCE_VISIBLE &&
948- ! elemIsInParent ( event . relatedTarget , window . CURRENT_NOTABLE_ELEMENT ) ) {
943+ ! elemIsInParent ( ev . relatedTarget , window . CURRENT_NOTABLE_ELEMENT ) ) {
949944 hideNotable ( true ) ;
950945 }
951946 } ;
You can’t perform that action at this time.
0 commit comments