File tree 1 file changed +6
-3
lines changed
src/librustdoc/html/static
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -935,6 +935,9 @@ window.initSearch = function(rawSearchIndex) {
935
935
} ) ;
936
936
current += 1 ;
937
937
} ) ;
938
+ var SHIFT = 16 ;
939
+ var CTRL = 17 ;
940
+ var ALT = 18 ;
938
941
939
942
var currentTab = searchState . currentTab ;
940
943
if ( e . which === 38 ) { // up
@@ -967,10 +970,10 @@ window.initSearch = function(rawSearchIndex) {
967
970
e . preventDefault ( ) ;
968
971
} else if ( e . which === 13 ) { // return
969
972
if ( actives [ currentTab ] . length ) {
970
- document . location . href =
971
- actives [ currentTab ] [ 0 ] . getElementsByTagName ( "a" ) [ 0 ] . href ;
973
+ var elem = actives [ currentTab ] [ 0 ] . getElementsByTagName ( "a" ) [ 0 ] ;
974
+ document . location . href = elem . href ;
972
975
}
973
- } else if ( e . which === 16 ) { // shift
976
+ } else if ( [ SHIFT , CTRL , ALT ] . indexOf ( e . which ) !== - 1 ) {
974
977
// Does nothing, it's just to avoid losing "focus" on the highlighted element.
975
978
} else if ( actives [ currentTab ] . length > 0 ) {
976
979
removeClass ( actives [ currentTab ] [ 0 ] , "highlighted" ) ;
You can’t perform that action at this time.
0 commit comments