@@ -885,12 +885,12 @@ window.initSearch = function(rawSearchIndex) {
885885 focusSearchResult ( ) ;
886886 }
887887
888- // focus the first search result on the active tab, or the result that
888+ // Focus the first search result on the active tab, or the result that
889889 // was focused last time this tab was active.
890890 function focusSearchResult ( ) {
891891 var target = searchState . focusedByTab [ searchState . currentTab ] ||
892- document . querySelectorAll ( ".search-results.active a" ) . item ( 0 ) ||
893- document . querySelectorAll ( "#titles > button" ) . item ( searchState . currentTab ) ;
892+ document . querySelectorAll ( ".search-results.active a" ) . item ( 0 ) ||
893+ document . querySelectorAll ( "#titles > button" ) . item ( searchState . currentTab ) ;
894894 if ( target ) {
895895 target . focus ( ) ;
896896 }
@@ -1076,6 +1076,8 @@ window.initSearch = function(rawSearchIndex) {
10761076 ret_others [ 0 ] + ret_in_args [ 0 ] + ret_returned [ 0 ] + "</div>" ;
10771077
10781078 search . innerHTML = output ;
1079+ // Reset focused elements.
1080+ searchState . focusedByTab = [ null , null , null ] ;
10791081 searchState . showResults ( search ) ;
10801082 var elems = document . getElementById ( "titles" ) . childNodes ;
10811083 elems [ 0 ] . onclick = function ( ) { printTab ( 0 ) ; } ;
@@ -1365,7 +1367,6 @@ window.initSearch = function(rawSearchIndex) {
13651367 if ( e . which === 38 ) { // up
13661368 var previous = document . activeElement . previousElementSibling ;
13671369 if ( previous ) {
1368- console . log ( "previousElementSibling" , previous ) ;
13691370 previous . focus ( ) ;
13701371 } else {
13711372 searchState . focus ( ) ;
0 commit comments