From cfbe51cf761eaee6dddb6eebe889cf21789e56c8 Mon Sep 17 00:00:00 2001
From: Cornelius <cornelius.amzar@bsz-bw.de>
Date: Mon, 23 Nov 2015 13:17:39 +0100
Subject: [PATCH] Fixed some minor issues

---
 themes/bootstrap3/js/common.js | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js
index 0fb4f4ccf54..5e37ec3edef 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();
         });
     }  
 }
-- 
GitLab