diff options
| author | Barosl Lee <vcs@barosl.com> | 2015-04-12 07:32:53 +0900 |
|---|---|---|
| committer | Barosl Lee <vcs@barosl.com> | 2015-04-13 10:33:50 +0900 |
| commit | cef96b95f210b225b49ab172074f32938e2046db (patch) | |
| tree | 902e8e588217baabdcd246706bdfe4595782dd7a /src/librustdoc/html | |
| parent | c3947061d6a914e9f1ac6267b2b079ce851d0e62 (diff) | |
| download | rust-cef96b95f210b225b49ab172074f32938e2046db.tar.gz rust-cef96b95f210b225b49ab172074f32938e2046db.zip | |
rustdoc: Prevent '/' from showing the help dialog
Only '?' should do that. Fixes #24289.
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/static/main.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 484021fedc4..c3ab375a9e2 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(); |
