]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: Prevent '/' from showing the help dialog
authorBarosl Lee <vcs@barosl.com>
Sat, 11 Apr 2015 22:32:53 +0000 (07:32 +0900)
committerBarosl Lee <vcs@barosl.com>
Mon, 13 Apr 2015 01:33:50 +0000 (10:33 +0900)
Only '?' should do that.

Fixes #24289.

src/librustdoc/html/static/main.js

index 484021fedc46f946ae8acca10fa30ccd5dceff91..c3ab375a9e24a7b8a52dcb801f9582fab033f282 100644 (file)
             return;
         }
 
-        if (e.which === 191 && $('#help').hasClass('hidden')) { // question mark
-            e.preventDefault();
-            $('#help').removeClass('hidden');
+        if (e.which === 191) { // question mark
+            if (e.shiftKey && $('#help').hasClass('hidden')) {
+                e.preventDefault();
+                $('#help').removeClass('hidden');
+            }
         } else if (e.which === 27) { // esc
             if (!$('#help').hasClass('hidden')) {
                 e.preventDefault();