浏览代码

fix buffer loop

Robin Herbots 12 年之前
父节点
当前提交
4ea423068b

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 2
 build.minor = 2
-build.revision = 60
+build.revision = 61
 
 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.2.60",
+    "version": "2.2.61",
     "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
         "jquery": ">=1.5"

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


+ 6 - 6
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.60
+* Version: 2.2.61
 */
 
 (function ($) {
@@ -643,7 +643,7 @@
                     $.each(inputValue, function (ndx, charCode) {
                         var index = isRTL ? (opts.numericInput ? ml : ml - ndx) : ndx;
                         if ((strict && isMask(isRTL ? index - 1 : index)) ||
-                            (charCode != getBufferElement(getActiveBufferTemplate(), isRTL ? index - 1 : index, true) &&
+                            (charCode != getBufferElement(getActiveBufferTemplate().slice(), isRTL ? index - 1 : index, true) &&
                              $.inArray(charCode, getActiveBufferTemplate().slice(getActiveMaskSet()["lastValidPosition"] + 1, getActiveMaskSet()["p"])) == -1)
                             ) {
                             $(input).trigger("keypress", [true, charCode.charCodeAt(0), writeOut, strict, index, isRTL]);
@@ -1465,7 +1465,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.60
+Version: 2.2.61
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1567,7 +1567,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.60
+Version: 2.2.61
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2036,7 +2036,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.60
+Version: 2.2.61
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2199,7 +2199,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.60
+Version: 2.2.61
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask

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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 1 - 1
js/jquery.inputmask.js

@@ -643,7 +643,7 @@
                     $.each(inputValue, function (ndx, charCode) {
                         var index = isRTL ? (opts.numericInput ? ml : ml - ndx) : ndx;
                         if ((strict && isMask(isRTL ? index - 1 : index)) ||
-                            (charCode != getBufferElement(getActiveBufferTemplate(), isRTL ? index - 1 : index, true) &&
+                            (charCode != getBufferElement(getActiveBufferTemplate().slice(), isRTL ? index - 1 : index, true) &&
                              $.inArray(charCode, getActiveBufferTemplate().slice(getActiveMaskSet()["lastValidPosition"] + 1, getActiveMaskSet()["p"])) == -1)
                             ) {
                             $(input).trigger("keypress", [true, charCode.charCodeAt(0), writeOut, strict, index, isRTL]);