Skip to content

Commit 35d69fe

Browse files
committed
Removing duplicate call to checkVal(true) on paste
close digitalBush#62
1 parent a70eee6 commit 35d69fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jquery.maskedinput.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,9 @@
313313
.bind("keypress.mask", keypressEvent)
314314
.bind(pasteEventName, function() {
315315
setTimeout(function() {
316-
input.caret(checkVal(true));
317-
if (settings.completed && checkVal(true) == input.val().length)
316+
var pos=checkVal(true);
317+
input.caret(pos);
318+
if (settings.completed && pos == input.val().length)
318319
settings.completed.call(input);
319320
}, 0);
320321
});

0 commit comments

Comments
 (0)