|
|
@@ -3,7 +3,7 @@
|
|
|
* https://github.com/RobinHerbots/Inputmask
|
|
|
* Copyright (c) 2010 - 2018 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 4.0.1-beta.14
|
|
|
+* Version: 4.0.1-beta.15
|
|
|
*/
|
|
|
|
|
|
!function(factory) {
|
|
|
@@ -74,9 +74,9 @@
|
|
|
}
|
|
|
function maskScope(actionObj, maskset, opts) {
|
|
|
maskset = maskset || this.maskset, opts = opts || this.opts;
|
|
|
- var undoValue, $el, maxLength, colorMask, inputmask = this, el = this.el, isRTL = this.isRTL, skipKeyPressEvent = !1, skipInputEvent = !1, ignorable = !1, mouseEnter = !1, originalPlaceholder = "";
|
|
|
+ var undoValue, $el, maxLength, colorMask, jitPos, inputmask = this, el = this.el, isRTL = this.isRTL, skipKeyPressEvent = !1, skipInputEvent = !1, ignorable = !1, mouseEnter = !1, jitOffset = 0, originalPlaceholder = "";
|
|
|
function getMaskTemplate(baseOnInput, minimalPos, includeMode, noJit, clearOptionalTail) {
|
|
|
- !0 !== noJit && (undefined, 0);
|
|
|
+ !0 !== noJit && (jitPos = undefined, jitOffset = 0);
|
|
|
var greedy = opts.greedy;
|
|
|
clearOptionalTail && (opts.greedy = !1), minimalPos = minimalPos || 0;
|
|
|
var ndxIntlzr, test, testPos, maskTemplate = [], pos = 0, lvp = getLastValidPosition();
|
|
|
@@ -85,8 +85,8 @@
|
|
|
ndxIntlzr = testPos.locator.slice(), maskTemplate.push(!0 === includeMode ? testPos.input : !1 === includeMode ? test.nativeDef : getPlaceholder(pos, test)); else {
|
|
|
test = (testPos = getTestTemplate(pos, ndxIntlzr, pos - 1)).match, ndxIntlzr = testPos.locator.slice();
|
|
|
var jitMasking = !0 !== noJit && (!1 !== opts.jitMasking ? opts.jitMasking : test.jit);
|
|
|
- !1 === jitMasking || jitMasking === undefined || pos < lvp || "number" == typeof jitMasking && isFinite(jitMasking) && jitMasking > pos ? maskTemplate.push(!1 === includeMode ? test.nativeDef : getPlaceholder(pos, test)) : test.jit && test.optionalQuantifier !== undefined && (pos,
|
|
|
- 0);
|
|
|
+ !1 === jitMasking || jitMasking === undefined || pos < lvp || "number" == typeof jitMasking && isFinite(jitMasking) && jitMasking > pos ? maskTemplate.push(!1 === includeMode ? test.nativeDef : getPlaceholder(pos, test)) : test.jit && test.optionalQuantifier !== undefined && (jitPos = pos,
|
|
|
+ jitOffset++);
|
|
|
}
|
|
|
"auto" === opts.keepStatic && test.newBlockMarker && null !== test.fn && (opts.keepStatic = pos - 1),
|
|
|
pos++;
|
|
|
@@ -382,8 +382,8 @@
|
|
|
strict = !0 === strict;
|
|
|
var maskPos = pos;
|
|
|
function _isValid(position, c, strict) {
|
|
|
- var rslt = !1;
|
|
|
- return $.each(getTests(position), function(ndx, tst) {
|
|
|
+ var rslt = !1, tstPosition = jitPos !== undefined && position >= jitPos ? position + jitOffset : position;
|
|
|
+ return $.each(getTests(tstPosition), function(ndx, tst) {
|
|
|
var test = tst.match;
|
|
|
if (getBuffer(!0), !1 !== (rslt = null != test.fn ? test.fn.test(c, getMaskSet(), position, strict, opts, isSelection(pos)) : (c === test.def || c === opts.skipOptionalPartCharacter) && "" !== test.def && {
|
|
|
c: getPlaceholder(position, test, !0) || test.def,
|