From cef96b95f210b225b49ab172074f32938e2046db Mon Sep 17 00:00:00 2001 From: Barosl Lee Date: Sun, 12 Apr 2015 07:32:53 +0900 Subject: [PATCH] rustdoc: Prevent '/' from showing the help dialog Only '?' should do that. Fixes #24289. --- src/librustdoc/html/static/main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 484021fedc46f..c3ab375a9e24a 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -78,9 +78,11 @@ 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();