Skip to content

Commit 0caca8f

Browse files
committed
rustdoc: Prevent '/' from showing the help dialog
Only '?' should do that. Fixes #24289.
1 parent 6790b0e commit 0caca8f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/librustdoc/html/static/main.js

Lines changed: 5 additions & 3 deletions
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)