Browse Source

fix positioning

Robin Herbots 11 years ago
parent
commit
15a5052c13

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
     "name": "jquery.inputmask",
     "name": "jquery.inputmask",
-    "version": "3.0.49",
+    "version": "3.0.50",
     "main": "./dist/jquery.inputmask.bundle.js",
     "main": "./dist/jquery.inputmask.bundle.js",
 	"keywords" : ["jQuery", "plugins", "input", "form", "inputmask", "mask"],
 	"keywords" : ["jQuery", "plugins", "input", "form", "inputmask", "mask"],
 	"description": "jquery.inputmask is a jquery plugin which create an input mask.",
 	"description": "jquery.inputmask is a jquery plugin which create an input mask.",

+ 1 - 1
build.properties

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

+ 10 - 9
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.0.49
+* Version: 3.0.50
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -1127,9 +1127,10 @@
                                 forwardPosition = valResult.caret;
                                 forwardPosition = valResult.caret;
                             else {
                             else {
                                 var vps = getMaskSet()["validPositions"];
                                 var vps = getMaskSet()["validPositions"];
-                                if (vps[p + 1] != undefined && getTestTemplate(pos + 1, vps[p].locator.slice(), p)["match"].def != vps[p + 1]["match"].def)
+                                if (vps[p + 1] != undefined && getTests(p + 1, vps[p].locator.slice(), p).length > 1)
                                     forwardPosition = p + 1;
                                     forwardPosition = p + 1;
-                                else forwardPosition = seekNext(p);
+                                else
+                                    forwardPosition = seekNext(p);
                             }
                             }
                             getMaskSet()["p"] = forwardPosition; //needed for checkval
                             getMaskSet()["p"] = forwardPosition; //needed for checkval
                         }
                         }
@@ -1714,7 +1715,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.0.49
+* Version: 3.0.50
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -2077,7 +2078,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.0.49
+Version: 3.0.50
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2198,7 +2199,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.0.49
+Version: 3.0.50
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2661,7 +2662,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.0.49
+Version: 3.0.50
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2884,7 +2885,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.0.49
+Version: 3.0.50
 
 
 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
@@ -3071,7 +3072,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.0.49
+Version: 3.0.50
 
 
 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

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


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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 3 - 2
js/jquery.inputmask.js

@@ -1127,9 +1127,10 @@
                                 forwardPosition = valResult.caret;
                                 forwardPosition = valResult.caret;
                             else {
                             else {
                                 var vps = getMaskSet()["validPositions"];
                                 var vps = getMaskSet()["validPositions"];
-                                if (vps[p + 1] != undefined && getTestTemplate(pos + 1, vps[p].locator.slice(), p)["match"].def != vps[p + 1]["match"].def)
+                                if (vps[p + 1] != undefined && getTests(p + 1, vps[p].locator.slice(), p).length > 1)
                                     forwardPosition = p + 1;
                                     forwardPosition = p + 1;
-                                else forwardPosition = seekNext(p);
+                                else
+                                    forwardPosition = seekNext(p);
                             }
                             }
                             getMaskSet()["p"] = forwardPosition; //needed for checkval
                             getMaskSet()["p"] = forwardPosition; //needed for checkval
                         }
                         }