Browse Source

enhance checkval for keepStatic

Robin Herbots 11 years ago
parent
commit
f9c57bc151

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.1.2",
+  "version": "3.1.3",
   "main": [
     "./dist/inputmask/jquery.inputmask.js",
     "./dist/inputmask/jquery.inputmask.extensions.js",

+ 1 - 1
build.properties

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

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


+ 8 - 8
dist/jquery.inputmask.bundle.js

@@ -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.2
+* Version: 3.1.3
 */
 
 (function (factory) {
@@ -367,7 +367,7 @@
                 if (soft !== true) {
                     maskset["_buffer"] = undefined;
                     maskset["validPositions"] = {};
-                    maskset["p"] = -1;
+                    maskset["p"] = 0;
                 }
             }
             function getLastValidPosition(closestTo) {
@@ -1294,7 +1294,7 @@
 
                         var pos, forwardPosition, c = String.fromCharCode(k);
                         if (checkval) {
-                            var pcaret = strict ? ndx : getLastValidPosition() + 1;
+                            var pcaret = strict ? ndx : getMaskSet()["p"];
                             pos = { begin: pcaret, end: pcaret };
                         } else {
                             pos = caret(input);
@@ -1977,7 +1977,7 @@ Input Mask plugin extensions
 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.2
+Version: 3.1.3
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2105,7 +2105,7 @@ Input Mask plugin extensions
 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.2
+Version: 3.1.3
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2601,7 +2601,7 @@ Input Mask plugin extensions
 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.2
+Version: 3.1.3
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2861,7 +2861,7 @@ Input Mask plugin extensions
 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.2
+Version: 3.1.3
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
@@ -3055,7 +3055,7 @@ Input Mask plugin extensions
 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.2
+Version: 3.1.3
 
 Phone extension.
 When using this extension make sure you specify the correct url to get the masks

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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 2 - 2
js/jquery.inputmask.js

@@ -367,7 +367,7 @@
                 if (soft !== true) {
                     maskset["_buffer"] = undefined;
                     maskset["validPositions"] = {};
-                    maskset["p"] = -1;
+                    maskset["p"] = 0;
                 }
             }
             function getLastValidPosition(closestTo) {
@@ -1294,7 +1294,7 @@
 
                         var pos, forwardPosition, c = String.fromCharCode(k);
                         if (checkval) {
-                            var pcaret = strict ? ndx : getLastValidPosition() + 1;
+                            var pcaret = strict ? ndx : getMaskSet()["p"];
                             pos = { begin: pcaret, end: pcaret };
                         } else {
                             pos = caret(input);

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.1.2",
+  "version": "3.1.3",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
   "main": [
     "./dist/inputmask/jquery.inputmask.js",