diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index 0fb4f4ccf54925b2a2204a48aa57615f4c9ce88b..5e37ec3edeff2653bf9159875b264adbdbaa42d6 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -358,18 +358,16 @@ function setupAutocomplete() { function keyboardShortcuts() { if ($('.pager').length > 0) { $(window).keydown(function(e) { -// console.log(e.keyCode); $target = null; switch (e.keyCode) { case 37: // left arrow key - e.preventDefault(); $target = $('.pager').find('a.previous'); if ($target.length > 0) { $target[0].click(); return; } + break; case 38: // up arrow key - e.preventDefault(); if (e.ctrlKey) { $target = $('.pager').find('a.backtosearch'); if ($target.length > 0) { @@ -377,15 +375,18 @@ function keyboardShortcuts() { return; } } + break; case 39: //right arrow key - e.preventDefault(); $target = $('.pager').find('a.next'); if ($target.length > 0) { $target[0].click(); return; } + break; case 40: // down arrow key - } + break; + } + e.preventDefault(); }); } }