diff --git a/js/src/util.js b/js/src/util.js index cb37f320..1ffaa13f 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -61,7 +61,18 @@ const Util = (($) => { if (typeof event.which === 'undefined') { return true } else if (typeof event.which === 'number' && event.which > 0) { - return !event.ctrlKey && !event.metaKey && !event.altKey && event.which !== 8 && event.which !== 9 + return ( + !evt.ctrlKey + && !evt.metaKey + && !evt.altKey + && evt.which != 8 // backspace + && evt.which != 9 // tab + && evt.which != 13 // enter + && evt.which != 16 // shift + && evt.which != 17 // ctrl + && evt.which != 20 // caps lock + && evt.which != 27 // escape + ) } return false },