Browse Source

fix unmasking - not taken placeholders equal to the value into account

Robin Herbots 12 years ago
parent
commit
d8c4718bd3

+ 1 - 1
build.properties

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

BIN
dist/jQuery.InputMask.1.3.8.nupkg


BIN
dist/jQuery.InputMask.1.3.9.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: 1.3.8
+* Version: 1.3.9
 */
 
 (function ($) {
@@ -527,7 +527,7 @@
                     var buffer = _buffer.slice();
                     checkVal(input, buffer);
                     return $.map(buffer, function (element, index) {
-                        return isMask(index) && element != getBufferElement(_buffer.slice(), index) ? element : null;
+                        return isMask(index) && isValid(index, element, buffer, true) ? element : null;
                     }).join('');
                 }
                 else {
@@ -1115,7 +1115,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: 1.3.8
+Version: 1.3.9
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1212,7 +1212,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: 1.3.8
+Version: 1.3.9
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1705,7 +1705,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: 1.3.8
+Version: 1.3.9
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1742,7 +1742,7 @@ Optional extensions on the jquery.inputmask base
                 var bufVal = cbuf.join('');
                 if (opts.autoGroup || (reformatOnly && bufVal.indexOf(opts.groupSeparator) != -1)) {
                     bufVal = bufVal.replace(new RegExp("\\" + opts.groupSeparator, "g"), '');
-                    radixSplit = bufVal.split(opts.radixPoint);
+                    var radixSplit = bufVal.split(opts.radixPoint);
                     bufVal = radixSplit[0];
                     var reg = new RegExp('([-\+]?[\\d\?]+)([\\d\?]{' + opts.groupSize + '})');
                     while (reg.test(bufVal)) {

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


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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 1 - 1
js/jquery.inputmask.js

@@ -527,7 +527,7 @@
                     var buffer = _buffer.slice();
                     checkVal(input, buffer);
                     return $.map(buffer, function (element, index) {
-                        return isMask(index) && element != getBufferElement(_buffer.slice(), index) ? element : null;
+                        return isMask(index) && isValid(index, element, buffer, true) ? element : null;
                     }).join('');
                 }
                 else {

+ 1 - 1
js/jquery.inputmask.numeric.extensions.js

@@ -40,7 +40,7 @@ Optional extensions on the jquery.inputmask base
                 var bufVal = cbuf.join('');
                 if (opts.autoGroup || (reformatOnly && bufVal.indexOf(opts.groupSeparator) != -1)) {
                     bufVal = bufVal.replace(new RegExp("\\" + opts.groupSeparator, "g"), '');
-                    radixSplit = bufVal.split(opts.radixPoint);
+                    var radixSplit = bufVal.split(opts.radixPoint);
                     bufVal = radixSplit[0];
                     var reg = new RegExp('([-\+]?[\\d\?]+)([\\d\?]{' + opts.groupSize + '})');
                     while (reg.test(bufVal)) {