rollup merge of #24337: barosl/rustdoc-help-key

Only '?' should do that.

Fixes #24289.
This commit is contained in:
Alex Crichton 2015-04-14 10:55:43 -07:00
commit 5780fc1145

View File

@ -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();