mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-15 07:12:35 +00:00
Fix keyboard navigation to trigger only if no modifier key is pressed
This commit is contained in:
parent
a7272e0ff5
commit
f814e96459
1 changed files with 1 additions and 0 deletions
|
@ -33,6 +33,7 @@ $( document ).ready(function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).on('keydown', function (e) {
|
$(document).on('keydown', function (e) {
|
||||||
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; }
|
||||||
switch (e.keyCode) {
|
switch (e.keyCode) {
|
||||||
case KEY_CODES.NEXT_KEY:
|
case KEY_CODES.NEXT_KEY:
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Reference in a new issue