|
|
@@ -80,7 +80,7 @@ function getMaskTemplate(baseOnInput, minimalPos, includeMode, noJit, clearOptio
|
|
|
ndxIntlzr = testPos.locator.slice();
|
|
|
var jitMasking = noJit === true ? false : (opts.jitMasking !== false ? opts.jitMasking : test.jit);
|
|
|
//check for groupSeparator is a hack for the numerics as we don't want the render of the groupSeparator beforehand
|
|
|
- jitRenderStatic = (jitRenderStatic && test.static && test.def !== opts.groupSeparator && test.fn === null) || (maskset.validPositions[pos - 1] && test.static && test.def !== opts.groupSeparator && test.fn === null);
|
|
|
+ jitRenderStatic = ((jitRenderStatic && test.static && test.def !== opts.groupSeparator && test.fn === null) || (maskset.validPositions[pos - 1] && test.static && test.def !== opts.groupSeparator && test.fn === null)) && maskset.tests[pos] && maskset.tests[pos].length === 1;
|
|
|
if (jitRenderStatic || jitMasking === false || jitMasking === undefined /*|| pos < lvp*/ || (typeof jitMasking === "number" && isFinite(jitMasking) && jitMasking > pos)) {
|
|
|
maskTemplate.push(includeMode === false ? test.nativeDef : getPlaceholder.call(inputmask, pos, test));
|
|
|
} else {
|
|
|
@@ -318,7 +318,7 @@ function getTests(pos, ndxIntlzr, tstPs) {
|
|
|
maltMatches,
|
|
|
currentMatches = matches.slice(),
|
|
|
loopNdxCnt = loopNdx.length,
|
|
|
- unMatchedAlternation = false;
|
|
|
+ unMatchedAlternation = false;
|
|
|
var altIndex = ndxInitializer.length > 0 ? ndxInitializer.shift() : -1;
|
|
|
if (altIndex === -1 || typeof altIndex === "string") {
|
|
|
var currentPos = testPos,
|
|
|
@@ -356,10 +356,10 @@ function getTests(pos, ndxIntlzr, tstPs) {
|
|
|
if (tokenMatch && handleMatch(tokenMatch, [amndx].concat(loopNdx), quantifierRecurse)) {
|
|
|
match = true;
|
|
|
} else {
|
|
|
- if(ndx === 0) {
|
|
|
+ if (ndx === 0) {
|
|
|
unMatchedAlternation = true;
|
|
|
}
|
|
|
- if (tokenMatch && tokenMatch.matches && tokenMatch.matches.length > alternateToken.matches[0].matches.length) {
|
|
|
+ if (tokenMatch && tokenMatch.matches && tokenMatch.matches.length > alternateToken.matches[0].matches.length) {
|
|
|
break;
|
|
|
}
|
|
|
}
|