|
|
@@ -3,7 +3,7 @@
|
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
|
* Copyright (c) 2010 - 2015 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 3.2.6-22
|
|
|
+* Version: 3.2.6-23
|
|
|
*/
|
|
|
!function(factory) {
|
|
|
"function" == typeof define && define.amd ? define([ "inputmask.dependencyLib" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery")) : factory(window.dependencyLib || jQuery);
|
|
|
@@ -583,13 +583,13 @@
|
|
|
return !1;
|
|
|
}
|
|
|
function trackbackAlternations(originalPos, newPos) {
|
|
|
- for (var vp = getMaskSet().validPositions[newPos], targetLocator = vp.locator, tll = targetLocator.length, ps = originalPos; newPos > ps; ps++) if (!isMask(ps, !0)) {
|
|
|
+ for (var vp = getMaskSet().validPositions[newPos], targetLocator = vp.locator, tll = targetLocator.length, ps = originalPos; newPos > ps; ps++) if (void 0 === getMaskSet().validPositions[ps] && !isMask(ps, !0)) {
|
|
|
var tests = getTests(ps), bestMatch = tests[0], equality = -1;
|
|
|
$.each(tests, function(ndx, tst) {
|
|
|
for (var i = 0; tll > i && (void 0 !== tst.locator[i] && checkAlternationMatch(tst.locator[i].toString().split(","), targetLocator[i].toString().split(","))); i++) i > equality && (equality = i,
|
|
|
bestMatch = tst);
|
|
|
}), setValidPosition(ps, $.extend({}, bestMatch, {
|
|
|
- input: bestMatch.match.def
|
|
|
+ input: bestMatch.match.placeholder || bestMatch.match.def
|
|
|
}), !0);
|
|
|
}
|
|
|
}
|
|
|
@@ -601,10 +601,14 @@
|
|
|
(!strict || fromSetValid) && result === !1)) {
|
|
|
var currentPosValid = getMaskSet().validPositions[maskPos];
|
|
|
if (!currentPosValid || null !== currentPosValid.match.fn || currentPosValid.match.def !== c && c !== opts.skipOptionalPartCharacter) {
|
|
|
- if ((opts.insertMode || void 0 === getMaskSet().validPositions[seekNext(maskPos)]) && !isMask(maskPos, !0)) for (var nPos = maskPos + 1, snPos = seekNext(maskPos); snPos >= nPos; nPos++) if (result = _isValid(nPos, c, strict, fromSetValid),
|
|
|
- result !== !1) {
|
|
|
- trackbackAlternations(maskPos, nPos), maskPos = nPos;
|
|
|
- break;
|
|
|
+ if ((opts.insertMode || void 0 === getMaskSet().validPositions[seekNext(maskPos)]) && !isMask(maskPos, !0)) {
|
|
|
+ var staticChar = getTestTemplate(maskPos).match, staticChar = staticChar.placeholder || staticChar.def;
|
|
|
+ _isValid(maskPos, staticChar, strict, fromSetValid);
|
|
|
+ for (var nPos = maskPos + 1, snPos = seekNext(maskPos); snPos >= nPos; nPos++) if (result = _isValid(nPos, c, strict, fromSetValid),
|
|
|
+ result !== !1) {
|
|
|
+ trackbackAlternations(maskPos, nPos), maskPos = nPos;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
} else result = {
|
|
|
caret: seekNext(maskPos)
|
|
|
@@ -627,8 +631,9 @@
|
|
|
return result;
|
|
|
}
|
|
|
function isMask(pos, strict) {
|
|
|
- var test = getTest(pos);
|
|
|
- if (null != test.fn) return test.fn;
|
|
|
+ var test;
|
|
|
+ if (strict ? (test = getTestTemplate(pos).match, "" == test.def && (test = getTest(pos))) : test = getTest(pos),
|
|
|
+ null != test.fn) return test.fn;
|
|
|
if (strict !== !0 && pos > -1 && !opts.keepStatic && void 0 === getMaskSet().validPositions[pos]) {
|
|
|
var tests = getTests(pos, void 0, void 0, !0);
|
|
|
return tests.length > 2;
|