Robin Herbots 12 年之前
父节点
当前提交
3cabee4e4a

+ 1 - 1
build.properties

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

+ 1 - 1
component.json

@@ -1,6 +1,6 @@
 {
     "name": "jquery.inputmask",
-    "version": "2.3.52",
+    "version": "2.3.53",
     "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
         "jquery": ">=1.5"

二进制
dist/jQuery.InputMask.2.3.52.nupkg


二进制
dist/jQuery.InputMask.2.3.53.nupkg


+ 8 - 8
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.3.52
+* Version: 2.3.53
 */
 
 (function ($) {
@@ -829,7 +829,7 @@
                         }
                     });
 
-                    if (strict === true) {
+                    if (strict === true && getActiveMaskSet()["p"] != -1) {
                         getActiveMaskSet()["lastValidPosition"] = seekPrevious(getActiveMaskSet()["p"]);
                     }
                 }
@@ -1439,7 +1439,7 @@
                             determineActiveMasksetIndex();
                             writeBuffer(input, getActiveBuffer(), getActiveMaskSet()["p"]);
                             if (input._valueGet() == getActiveBufferTemplate().join(''))
-                               $input.trigger('cleared');
+                                $input.trigger('cleared');
 
                             if (opts.showTooltip) { //update tooltip
                                 $input.prop("title", getActiveMaskSet()["mask"]);
@@ -1680,7 +1680,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.3.52
+Version: 2.3.53
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1782,7 +1782,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.3.52
+Version: 2.3.53
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2266,7 +2266,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.3.52
+Version: 2.3.53
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2435,7 +2435,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.3.52
+Version: 2.3.53
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
@@ -2605,7 +2605,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.3.52
+Version: 2.3.53
 
 Phone extension based on https://github.com/andr-04/inputmask-multi
 When using this extension make sure you specify the correct url to get the masks

文件差异内容过多而无法显示
+ 2 - 2
dist/jquery.inputmask.bundle.min.js


文件差异内容过多而无法显示
+ 4 - 4
dist/min/jquery.inputmask.js


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 2 - 2
js/jquery.inputmask.js

@@ -829,7 +829,7 @@
                         }
                     });
 
-                    if (strict === true) {
+                    if (strict === true && getActiveMaskSet()["p"] != -1) {
                         getActiveMaskSet()["lastValidPosition"] = seekPrevious(getActiveMaskSet()["p"]);
                     }
                 }
@@ -1439,7 +1439,7 @@
                             determineActiveMasksetIndex();
                             writeBuffer(input, getActiveBuffer(), getActiveMaskSet()["p"]);
                             if (input._valueGet() == getActiveBufferTemplate().join(''))
-                               $input.trigger('cleared');
+                                $input.trigger('cleared');
 
                             if (opts.showTooltip) { //update tooltip
                                 $input.prop("title", getActiveMaskSet()["mask"]);

+ 12 - 0
qunit/tests.js

@@ -628,6 +628,18 @@ test("inputmask(\"9[9][9] 999[9] 9999\") - input 123123 space 1234 - vipink70",
     $("#testmask").remove();
 });
 
+test("inputmask({ mask: ['9 AAA-AAA', 'A 999-999'] }) ", function () {
+    $('body').append('<input type="text" id="testmask" />');
+    $("#testmask").inputmask({ mask: ['9 AAA-AAA', 'A 999-999'] });
+
+    $("#testmask").Type("1abc");
+    caret($("#testmask"), 0, 9);
+    $("#testmask").Type("a123");
+    equal($("#testmask").val(), "A 123-___", "Result " + $("#testmask").val());
+
+    $("#testmask").remove();
+});
+
 module("Date.Extensions");
 test("inputmask(\"dd/mm/yyyy\") - input 2331973", function () {
     $('body').append('<input type="text" id="testmask" />');