From 74c997889895bb999a530d437f38b6ee74106112 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Tue, 15 Oct 2024 19:06:04 +0200 Subject: [PATCH] Allow keyboard shortcuts (#4205) --- src/js/main.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/js/main.js b/src/js/main.js index e6826222a1..375191e78a 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -353,21 +353,6 @@ function startProcess() { } }); - $("#content").on('keydown', 'input[type="number"]', function (e) { - // whitelist all that we need for numeric control - const whitelist = [ - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, // numpad and standard number keypad - 109, 189, // minus on numpad and in standard keyboard - 8, 46, 9, // backspace, delete, tab - 190, 110, // decimal point - 37, 38, 39, 40, 13, // arrows and enter - ]; - - if (whitelist.indexOf(e.keyCode) === -1) { - e.preventDefault(); - } - }); - $("#content").on('change', 'input[type="number"]', function () { const element = $(this); const min = parseFloat(element.prop('min'));