Browse Source

do not trigger incomplete event when using the greedy: false and repeat option

Robin Herbots 13 years ago
parent
commit
f913a985dd
2 changed files with 3 additions and 4 deletions
  1. 2 2
      js/jquery.inputmask.js
  2. 1 2
      js/jquery.inputmask.numeric.extensions.js

+ 2 - 2
js/jquery.inputmask.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2012 Robin Herbots
 * Copyright (c) 2010 - 2012 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: 1.0.19
+* Version: 1.0.19a
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -647,7 +647,7 @@
 
 
                 //private functions
                 //private functions
                 function IsComplete(npt) {
                 function IsComplete(npt) {
-                    var complete = true, nptValue = npt._valueGet(), ml = getMaskLength();
+                    var complete = true, nptValue = npt._valueGet(), ml = nptValue.length;
                     for (var i = 0; i < ml; i++) {
                     for (var i = 0; i < ml; i++) {
                         if (isMask(i) && nptValue.charAt(i) == getPlaceHolder(i)) {
                         if (isMask(i) && nptValue.charAt(i) == getPlaceHolder(i)) {
                             complete = false;
                             complete = false;

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

@@ -3,7 +3,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2012 Robin Herbots
 Copyright (c) 2010 - 2012 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: 1.0.19
+Version: 1.0.19a
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -80,7 +80,6 @@ Optional extensions on the jquery.inputmask base
                             while (reg.test(bufVal)) {
                             while (reg.test(bufVal)) {
                                 bufVal = bufVal.replace(reg, '$1' + opts.groupSeparator + '$2');
                                 bufVal = bufVal.replace(reg, '$1' + opts.groupSeparator + '$2');
                             }
                             }
-                            console.log(bufVal);
                             for (var i = 0, l = bufVal.length - 1; i < l; i++) {
                             for (var i = 0, l = bufVal.length - 1; i < l; i++) {
                                 buffer[i] = bufVal.charAt(i);
                                 buffer[i] = bufVal.charAt(i);
                             }
                             }