File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ function getSearchElement() {
324324 }
325325
326326 function handleEscape ( ev ) {
327+ debugger ;
327328 var help = getHelpElement ( ) ;
328329 var search = getSearchElement ( ) ;
329330 hideModal ( ) ;
@@ -390,8 +391,8 @@ function getSearchElement() {
390391 return null ;
391392 }
392393
393- document . onkeypress = handleShortcut ;
394- document . onkeydown = handleShortcut ;
394+ document . addEventListener ( "keypress" , handleShortcut ) ;
395+ document . addEventListener ( "keydown" , handleShortcut ) ;
395396
396397 var handleSourceHighlight = ( function ( ) {
397398 var prev_line_id = 0 ;
@@ -430,7 +431,7 @@ function getSearchElement() {
430431 }
431432 } ) ( ) ;
432433
433- document . onclick = function ( ev ) {
434+ document . addEventListener ( "click" , function ( ev ) {
434435 if ( hasClass ( ev . target , "collapse-toggle" ) ) {
435436 collapseDocs ( ev . target , "toggle" ) ;
436437 } else if ( hasClass ( ev . target . parentNode , "collapse-toggle" ) ) {
@@ -452,7 +453,7 @@ function getSearchElement() {
452453 expandSection ( a . hash . replace ( / ^ # / , "" ) ) ;
453454 }
454455 }
455- } ;
456+ } ) ;
456457
457458 var x = document . getElementsByClassName ( "version-selector" ) ;
458459 if ( x . length > 0 ) {
You can’t perform that action at this time.
0 commit comments