From 24c3bfaec10c043b408f4f2bc94e5926c0059927 Mon Sep 17 00:00:00 2001 From: Dimitrios Kanellopoulos Date: Mon, 9 Feb 2015 23:50:02 +0100 Subject: [PATCH] Fix oldVal not beeing set --- src/jquery.maskedinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 9b38bd9..8adcc4f 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -199,7 +199,7 @@ $.fn.extend({ function androidInputEvent(e) { var curVal = input.val(); var pos = input.caret(); - if (curVal.length < oldVal.length) { + if (oldVal && oldVal.length && oldVal.length > curVal.length ) { // a deletion or backspace happened checkVal(true); while (pos.begin > 0 && !tests[pos.begin-1])