From 0b6c4c80958d495f367fa78aeef54aadc22a66a5 Mon Sep 17 00:00:00 2001 From: Aaron Fischer Date: Wed, 17 May 2017 21:49:12 +0200 Subject: [PATCH] Fix arrow keys, so it can be used in forms --- resources/public/js/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/public/js/main.js b/resources/public/js/main.js index c72d6df..c65a8b1 100644 --- a/resources/public/js/main.js +++ b/resources/public/js/main.js @@ -5,6 +5,10 @@ $(function () { }); $(document).on('keydown', function(e) { + // Only replace the arrow key functionif there are not needed + if ($('form input, form textarea').filter(':focus').length > 0) + return; + switch (e.keyCode) { case 76: // l case 39: // -->