Skip to content

Commit cef96b9

Browse files
committed
rustdoc: Prevent '/' from showing the help dialog
Only '?' should do that. Fixes rust-lang#24289.
1 parent c394706 commit cef96b9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/librustdoc/html/static/main.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@
7878
return;
7979
}
8080

81-
if (e.which === 191 && $('#help').hasClass('hidden')) { // question mark
82-
e.preventDefault();
83-
$('#help').removeClass('hidden');
81+
if (e.which === 191) { // question mark
82+
if (e.shiftKey && $('#help').hasClass('hidden')) {
83+
e.preventDefault();
84+
$('#help').removeClass('hidden');
85+
}
8486
} else if (e.which === 27) { // esc
8587
if (!$('#help').hasClass('hidden')) {
8688
e.preventDefault();

0 commit comments

Comments
 (0)