diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 9a13d208546..e32122ceb50 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -133,7 +133,7 @@
$(document).on("keypress", handleShortcut);
$(document).on("keydown", handleShortcut);
$(document).on("click", function(ev) {
- if (!$(e.target).closest("#help > div").length) {
+ if (!$(ev.target).closest("#help > div").length) {
$("#help").addClass("hidden");
$("body").removeClass("blur");
}