ソースを参照

enhance checkval for keepStatic

Robin Herbots 11 年 前
コミット
f9c57bc151

+ 1 - 1
bower.json

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

+ 1 - 1
build.properties

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

ファイルの差分が大きいため隠しています
+ 5 - 5
dist/inputmask/jquery.inputmask.js


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

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

ファイルの差分が大きいため隠しています
+ 6 - 6
dist/jquery.inputmask.bundle.min.js


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 2 - 2
js/jquery.inputmask.js

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

+ 1 - 1
package.json

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