diff options
Diffstat (limited to 'app/assets/javascripts/droplab/droplab_filter.js')
-rw-r--r-- | app/assets/javascripts/droplab/droplab_filter.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/droplab/droplab_filter.js b/app/assets/javascripts/droplab/droplab_filter.js index 9eb7893fe95..173256a0a76 100644 --- a/app/assets/javascripts/droplab/droplab_filter.js +++ b/app/assets/javascripts/droplab/droplab_filter.js @@ -3,7 +3,7 @@ /* global droplab */ require('../window')(function(w){ - var whiteListedKeys = [37, 38, 39, 40]; + var charRegex = new RegExp('^.$', 'g'); w.droplabFilter = { keydownWrapper: function(e){ @@ -18,7 +18,7 @@ require('../window')(function(w){ return; } - if (whiteListedKeys.indexOf(e.detail.which) !== -1) { + if (!charRegex.test(e.detail.key)) { return; } |