Browse Source

Fix for modified Android Keyboards from suppliers like Samsung/Sony/Xiaomi

danielnass 10 years ago
parent
commit
e4747699ad
1 changed files with 3 additions and 1 deletions
  1. 3 1
      js/inputmask.js

+ 3 - 1
js/inputmask.js

@@ -1727,7 +1727,9 @@
 
 				$.each(inputValue, function(ndx, charCode) {
 					var keypress = new $.Event("keypress");
-					keypress.which = charCode.charCodeAt(0);
+					if (charCode !== undefined) {
+						keypress.which = charCode.charCodeAt(0);
+					}
 					charCodes += charCode;
 					var lvp = getLastValidPosition(undefined, true),
 						lvTest = getMaskSet().validPositions[lvp],