about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-12-31 13:21:50 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2021-01-03 15:02:49 +0100
commit8b6304ed6240c9e0f2776bce9a8c311c47e17e1f (patch)
tree83998cbb9aec282815d77c8267c9082b1a460b5b
parent22fc4544ad1c25c2e4002f1e77ff325b29dd2a9b (diff)
downloadrust-8b6304ed6240c9e0f2776bce9a8c311c47e17e1f.tar.gz
rust-8b6304ed6240c9e0f2776bce9a8c311c47e17e1f.zip
Inline resetMouseMoved function directly into "mousemove" event handler
-rw-r--r--src/librustdoc/html/static/main.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index c542860ed68..71067d2b67c 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -493,11 +493,7 @@ function defocusSearchBar() {
     document.addEventListener("keypress", handleShortcut);
     document.addEventListener("keydown", handleShortcut);
 
-    function resetMouseMoved(ev) {
-        mouseMovedAfterSearch = true;
-    }
-
-    document.addEventListener("mousemove", resetMouseMoved);
+    document.addEventListener("mousemove", function() { mouseMovedAfterSearch = true; });
 
     var handleSourceHighlight = (function() {
         var prev_line_id = 0;