Skip to content

Commit

Permalink
Fix invalid results showing back
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 22, 2019
1 parent b677013 commit 71ff18f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustdoc/html/static/main.js
Expand Up @@ -1722,6 +1722,10 @@ function getSearchElement() {
search();
};
search_input.onchange = function(e) {
if (e.target !== document.activeElement) {
// To prevent doing anything when it's from a blur event.
return;
}
// Do NOT e.preventDefault() here. It will prevent pasting.
clearTimeout(searchTimeout);
// zero-timeout necessary here because at the time of event handler execution the
Expand Down

0 comments on commit 71ff18f

Please sign in to comment.