Skip to content

Commit 1b1d910

Browse files
committed
Make changing doc search unhighlight current result
If a result is highlighted, when the search changes that state should no longer be highlighted. Fixes #24044 cc @steveklabnik
1 parent bcae782 commit 1b1d910

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustdoc/html/static/main.js

+2
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@
468468
if ($active.length) {
469469
document.location.href = $active.find('a').prop('href');
470470
}
471+
} else {
472+
$active.removeClass('highlighted');
471473
}
472474
});
473475
}

0 commit comments

Comments
 (0)