@@ -100,6 +100,8 @@ function defocusSearchBar() {
100
100
// 2 for "In Return Types"
101
101
var currentTab = 0 ;
102
102
103
+ var mouseMovedAfterSearch = true ;
104
+
103
105
var titleBeforeSearch = document . title ;
104
106
105
107
function clearInputTimeout ( ) {
@@ -162,6 +164,7 @@ function defocusSearchBar() {
162
164
}
163
165
addClass ( main , "hidden" ) ;
164
166
removeClass ( search , "hidden" ) ;
167
+ mouseMovedAfterSearch = false ;
165
168
}
166
169
167
170
function hideSearchResults ( search ) {
@@ -424,6 +427,12 @@ function defocusSearchBar() {
424
427
document . addEventListener ( "keypress" , handleShortcut ) ;
425
428
document . addEventListener ( "keydown" , handleShortcut ) ;
426
429
430
+ function resetMouseMoved ( ev ) {
431
+ mouseMovedAfterSearch = true ;
432
+ }
433
+
434
+ document . addEventListener ( "mousemove" , resetMouseMoved ) ;
435
+
427
436
var handleSourceHighlight = ( function ( ) {
428
437
var prev_line_id = 0 ;
429
438
@@ -1353,20 +1362,22 @@ function defocusSearchBar() {
1353
1362
}
1354
1363
} ;
1355
1364
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
+ } ) ;
1366
1377
} ) ;
1367
- } ) ;
1368
- addClass ( el , "highlighted" ) ;
1369
- } , 20 ) ;
1378
+ addClass ( el , "highlighted" ) ;
1379
+ } , 20 ) ;
1380
+ }
1370
1381
} ;
1371
1382
onEachLazy ( document . getElementsByClassName ( "search-results" ) , function ( e ) {
1372
1383
onEachLazy ( e . getElementsByClassName ( "result" ) , function ( i_e ) {
0 commit comments