Skip to content

Commit

Permalink
Merge pull request selectize#797 from kivikakk/patch-1
Browse files Browse the repository at this point in the history
autoGrow now recognises numpad 0 as printable
  • Loading branch information
joallard authored Apr 7, 2017
2 parents 2fa9169 + 043991f commit 1e2dba2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,10 @@ var autoGrow = function($input) {
if (e.type && e.type.toLowerCase() === 'keydown') {
keyCode = e.keyCode;
printable = (
(keyCode >= 97 && keyCode <= 122) || // a-z
(keyCode >= 65 && keyCode <= 90) || // A-Z
(keyCode >= 48 && keyCode <= 57) || // 0-9
(keyCode >= 65 && keyCode <= 90) || // a-z
(keyCode >= 96 && keyCode <= 111) || // numpad 0-9, numeric operators
(keyCode >= 186 && keyCode <= 222) || // semicolon, equal, comma, dash, etc.
keyCode === 32 // space
);

Expand Down

0 comments on commit 1e2dba2

Please sign in to comment.