Robin Herbots 12 years ago
parent
commit
15d39c774b

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 2
 build.minor = 2
-build.revision = 5
+build.revision = 6
 
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js

BIN
dist/jQuery.InputMask.2.2.5.nupkg


BIN
dist/jQuery.InputMask.2.2.6.nupkg


+ 10 - 9
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2013 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 2.2.5
+* Version: 2.2.6
 */
 
 (function ($) {
@@ -341,7 +341,7 @@
                     var masks = splitFirstOptionalStartPart(maskParts[0]);
                     if (masks.length > 1) {
                         newMask = maskPrefix + masks[0] + markOptional(masks[1]) + (maskParts.length > 1 ? maskParts[1] : "");
-                        if (genmasks.indexOf(newMask) == -1) {
+                        if ($.inArray(newMask, genmasks) == -1) {
                             genmasks.push(newMask);
                             maskTemplate = getMaskTemplate(newMask);
                             ms.push({
@@ -354,7 +354,7 @@
                             });
                         }
                         newMask = maskPrefix + masks[0] + (maskParts.length > 1 ? maskParts[1] : "");
-                        if (genmasks.indexOf(newMask) == -1) {
+                        if ($.inArray(newMask, genmasks) == -1) {
                             genmasks.push(newMask);
                             maskTemplate = getMaskTemplate(newMask);
                             ms.push({
@@ -376,7 +376,7 @@
                     }
                     else {
                         newMask = maskPrefix + maskParts;
-                        if (genmasks.indexOf(newMask) == -1) {
+                        if ($.inArray(newMask, genmasks) == -1) {
                             genmasks.push(newMask);
                             maskTemplate = getMaskTemplate(newMask);
                             ms.push({
@@ -1155,9 +1155,10 @@
                                     determineActiveMasksetIndex(buffer, beginPos, activeMasksetIndex);
                                     writeBuffer(input, buffer, beginPos);
                                 } else if (activeMasksetIndex > 0) { //retry other masks
-                                    beginPos = shiftL(beginPos - 1, maskL);
                                     activeMasksetIndex = 0; //reset
-                                    writeBuffer(input, getActiveBuffer(), beginPos);
+                                    clearBuffer(buffer, 0, firstMaskPos);
+                                    firstMaskPos = seekNext(buffer, -1);
+                                    writeBuffer(input, getActiveBuffer(), isRTL ? maskL : firstMaskPos);
                                 }
                             }
                         }
@@ -1335,7 +1336,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.5
+Version: 2.2.6
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1432,7 +1433,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2012 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.5
+Version: 2.2.6
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1925,7 +1926,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.5
+Version: 2.2.6
 
 Optional extensions on the jquery.inputmask base
 */

File diff suppressed because it is too large
+ 49 - 49
dist/jquery.inputmask.bundle.min.js


File diff suppressed because it is too large
+ 32 - 32
dist/min/jquery.inputmask.js


+ 1 - 1
jquery.inputmask.jquery.json

@@ -8,7 +8,7 @@
 		"inputmask",
 		"mask"
     ],
-    "version": "2.2.5",
+    "version": "2.2.6",
     "author": {
         "name": "Robin Herbots",
         "url": "http://github.com/RobinHerbots/jquery.inputmask"

+ 6 - 5
js/jquery.inputmask.js

@@ -341,7 +341,7 @@
                     var masks = splitFirstOptionalStartPart(maskParts[0]);
                     if (masks.length > 1) {
                         newMask = maskPrefix + masks[0] + markOptional(masks[1]) + (maskParts.length > 1 ? maskParts[1] : "");
-                        if (genmasks.indexOf(newMask) == -1) {
+                        if ($.inArray(newMask, genmasks) == -1) {
                             genmasks.push(newMask);
                             maskTemplate = getMaskTemplate(newMask);
                             ms.push({
@@ -354,7 +354,7 @@
                             });
                         }
                         newMask = maskPrefix + masks[0] + (maskParts.length > 1 ? maskParts[1] : "");
-                        if (genmasks.indexOf(newMask) == -1) {
+                        if ($.inArray(newMask, genmasks) == -1) {
                             genmasks.push(newMask);
                             maskTemplate = getMaskTemplate(newMask);
                             ms.push({
@@ -376,7 +376,7 @@
                     }
                     else {
                         newMask = maskPrefix + maskParts;
-                        if (genmasks.indexOf(newMask) == -1) {
+                        if ($.inArray(newMask, genmasks) == -1) {
                             genmasks.push(newMask);
                             maskTemplate = getMaskTemplate(newMask);
                             ms.push({
@@ -1155,9 +1155,10 @@
                                     determineActiveMasksetIndex(buffer, beginPos, activeMasksetIndex);
                                     writeBuffer(input, buffer, beginPos);
                                 } else if (activeMasksetIndex > 0) { //retry other masks
-                                    beginPos = shiftL(beginPos - 1, maskL);
                                     activeMasksetIndex = 0; //reset
-                                    writeBuffer(input, getActiveBuffer(), beginPos);
+                                    clearBuffer(buffer, 0, firstMaskPos);
+                                    firstMaskPos = seekNext(buffer, -1);
+                                    writeBuffer(input, getActiveBuffer(), isRTL ? maskL : firstMaskPos);
                                 }
                             }
                         }