ソースを参照

wuSam fix for initial value & .val ;-)

Robin Herbots 12 年 前
コミット
cb08e971e6

+ 1 - 1
build.properties

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

BIN
dist/jQuery.InputMask.2.2.33.nupkg


BIN
dist/jQuery.InputMask.2.2.34.nupkg


+ 8 - 7
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.33
+* Version: 2.2.34
 */
 
 (function ($) {
@@ -637,8 +637,9 @@
 
                     var ml = getMaskLength();
                     $.each(inputValue, function (ndx, charCode) {
-                        if (strict !== true || isMask(isRTL ? (opts.numericInput ? seekPrevious(ml) : ml - ndx - 1) : ndx)) {
-                            var index = isRTL ? (opts.numericInput ? ml : ml - ndx - 1) : ndx;
+                        var index = isRTL ? (opts.numericInput ? ml : ml - ndx - 1) : ndx;
+                        if (isMask(isRTL ? (opts.numericInput ? seekPrevious(ml) : ml - ndx - 1) : ndx)
+                        || (strict !== true && charCode != getBufferElement(getActiveBufferTemplate(), index, true))) {
                             $(input).trigger("keypress", [true, charCode.charCodeAt(0), writeOut, strict, index]);
                         }
                     });
@@ -1467,7 +1468,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.33
+Version: 2.2.34
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1564,7 +1565,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.33
+Version: 2.2.34
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2057,7 +2058,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.33
+Version: 2.2.34
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2219,7 +2220,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.33
+Version: 2.2.34
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask

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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 3 - 2
js/jquery.inputmask.js

@@ -637,8 +637,9 @@
 
                     var ml = getMaskLength();
                     $.each(inputValue, function (ndx, charCode) {
-                        if (strict !== true || isMask(isRTL ? (opts.numericInput ? seekPrevious(ml) : ml - ndx - 1) : ndx)) {
-                            var index = isRTL ? (opts.numericInput ? ml : ml - ndx - 1) : ndx;
+                        var index = isRTL ? (opts.numericInput ? ml : ml - ndx - 1) : ndx;
+                        if (isMask(isRTL ? (opts.numericInput ? seekPrevious(ml) : ml - ndx - 1) : ndx)
+                        || (strict !== true && charCode != getBufferElement(getActiveBufferTemplate(), index, true))) {
                             $(input).trigger("keypress", [true, charCode.charCodeAt(0), writeOut, strict, index]);
                         }
                     });