@@ -100,6 +100,8 @@ function defocusSearchBar() {
100100 // 2 for "In Return Types"
101101 var currentTab = 0 ;
102102
103+ var mouseMovedAfterSearch = true ;
104+
103105 var titleBeforeSearch = document . title ;
104106
105107 function clearInputTimeout ( ) {
@@ -162,6 +164,7 @@ function defocusSearchBar() {
162164 }
163165 addClass ( main , "hidden" ) ;
164166 removeClass ( search , "hidden" ) ;
167+ mouseMovedAfterSearch = false ;
165168 }
166169
167170 function hideSearchResults ( search ) {
@@ -424,6 +427,12 @@ function defocusSearchBar() {
424427 document . addEventListener ( "keypress" , handleShortcut ) ;
425428 document . addEventListener ( "keydown" , handleShortcut ) ;
426429
430+ function resetMouseMoved ( ev ) {
431+ mouseMovedAfterSearch = true ;
432+ }
433+
434+ document . addEventListener ( "mousemove" , resetMouseMoved ) ;
435+
427436 var handleSourceHighlight = ( function ( ) {
428437 var prev_line_id = 0 ;
429438
@@ -1353,20 +1362,22 @@ function defocusSearchBar() {
13531362 }
13541363 } ;
13551364 var mouseover_func = function ( e ) {
1356- var el = e . target ;
1357- // to retrieve the real "owner" of the event.
1358- while ( el . tagName !== "TR" ) {
1359- el = el . parentNode ;
1360- }
1361- clearTimeout ( hoverTimeout ) ;
1362- hoverTimeout = setTimeout ( function ( ) {
1363- onEachLazy ( document . getElementsByClassName ( "search-results" ) , function ( e ) {
1364- onEachLazy ( e . getElementsByClassName ( "result" ) , function ( i_e ) {
1365- removeClass ( i_e , "highlighted" ) ;
1365+ if ( mouseMovedAfterSearch ) {
1366+ var el = e . target ;
1367+ // to retrieve the real "owner" of the event.
1368+ while ( el . tagName !== "TR" ) {
1369+ el = el . parentNode ;
1370+ }
1371+ clearTimeout ( hoverTimeout ) ;
1372+ hoverTimeout = setTimeout ( function ( ) {
1373+ onEachLazy ( document . getElementsByClassName ( "search-results" ) , function ( e ) {
1374+ onEachLazy ( e . getElementsByClassName ( "result" ) , function ( i_e ) {
1375+ removeClass ( i_e , "highlighted" ) ;
1376+ } ) ;
13661377 } ) ;
1367- } ) ;
1368- addClass ( el , "highlighted" ) ;
1369- } , 20 ) ;
1378+ addClass ( el , "highlighted" ) ;
1379+ } , 20 ) ;
1380+ }
13701381 } ;
13711382 onEachLazy ( document . getElementsByClassName ( "search-results" ) , function ( e ) {
13721383 onEachLazy ( e . getElementsByClassName ( "result" ) , function ( i_e ) {
0 commit comments