Browse Source

#1061 Pasting to masked input not working on Android
Rootcause: some Android browsers doesn't allow use clipboard content.
Fix: allow default browser pasting in input if cannot use clipboard value.

https://github.com/RobinHerbots/jquery.inputmask/issues/1061

sokolova 9 years ago
parent
commit
065b5f99a7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      js/inputmask.js

+ 3 - 0
js/inputmask.js

@@ -2422,6 +2422,9 @@
 				if (!pasteValue) {
 					pasteValue = inputValue;
 				}
+				if (!pasteValue) {
+					return true;
+                }
 			}
 			checkVal(input, false, false, isRTL ? pasteValue.split("").reverse() : pasteValue.toString().split(""));
 			writeBuffer(input, getBuffer(), seekNext(getLastValidPosition()), e, undoValue !== getBuffer().join(""));