diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 0ec5cab78bc..14661dbaec4 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -125,6 +125,7 @@
break;
case "+":
+ ev.preventDefault();
toggleAllDocs();
break;