|
|
@@ -3,7 +3,7 @@
|
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
|
* Copyright (c) 2010 - 2014 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 3.1.43
|
|
|
+* Version: 3.1.44
|
|
|
*/
|
|
|
!function($) {
|
|
|
function isInputEventSupported(eventName) {
|
|
|
@@ -543,11 +543,12 @@
|
|
|
var inputValue = void 0 != nptvl ? nptvl.slice() : input._valueGet().split("");
|
|
|
resetMaskSet(), writeOut && input._valueSet("");
|
|
|
var staticInput = getBufferTemplate().slice(0, seekNext(-1)).join(""), matches = inputValue.join("").match(new RegExp(escapeRegex(staticInput), "g"));
|
|
|
- if (matches && matches.length > 1 && inputValue.splice(0, staticInput.length), $.each(inputValue, function(ndx, charCode) {
|
|
|
+ if (matches && matches.length > 1 && inputValue.splice(0, staticInput.length * matches.length),
|
|
|
+ $.each(inputValue, function(ndx, charCode) {
|
|
|
var keypress = $.Event("keypress");
|
|
|
keypress.which = charCode.charCodeAt(0);
|
|
|
var lvp = getLastValidPosition(), lvTest = getMaskSet().validPositions[lvp], nextTest = getTestTemplate(lvp + 1, lvTest ? lvTest.locator.slice() : void 0, lvp);
|
|
|
- if (-1 == $.inArray(charCode, getBufferTemplate().slice(lvp + 1, getMaskSet().p)) || strict) {
|
|
|
+ if (-1 == $.inArray(charCode, getBufferTemplate().slice(lvp + 1, ndx < getMaskSet().p ? ndx : getMaskSet().p)) || strict) {
|
|
|
var pos = strict ? ndx : null == nextTest.match.fn && lvp + 1 < getMaskSet().p ? lvp + 1 : getMaskSet().p;
|
|
|
keypressEvent.call(input, keypress, !0, !1, strict, pos);
|
|
|
} else keypressEvent.call(input, keypress, !0, !1, !0, lvp + 1);
|
|
|
@@ -1863,7 +1864,7 @@
|
|
|
bufVal = bufVal.replace(opts.groupSeparator + opts.groupSeparator, opts.groupSeparator);
|
|
|
"" != opts.radixPoint && radixSplit.length > 1 && (bufVal += opts.radixPoint + radixSplit[1]);
|
|
|
}
|
|
|
- needsRefresh = buffer.length != bufVal.length, buffer.length = bufVal.length;
|
|
|
+ needsRefresh = buffer.join("") != bufVal, buffer.length = bufVal.length;
|
|
|
for (var i = 0, l = bufVal.length; l > i; i++) buffer[i] = bufVal.charAt(i);
|
|
|
var newPos = $.inArray("?", buffer);
|
|
|
return reformatOnly ? buffer[newPos] = charAtPos : buffer.splice(newPos, 1), {
|