ソースを参照

fix keepstatic check

Robin Herbots 8 年 前
コミット
5a2a0dd0d8
1 ファイル変更1 行追加1 行削除
  1. 1 1
      js/inputmask.js

+ 1 - 1
js/inputmask.js

@@ -1093,7 +1093,7 @@
                                             altIndexArr = altIndexArrClone;
                                         }
                                     }
-                                    if (opts.keepStatic === true || currentPos >= opts.keepStatic) altIndexArr = altIndexArr.slice(0, 1);
+                                    if (opts.keepStatic === true || (isFinite(parseInt(opts.keepStatic)) && currentPos >= opts.keepStatic)) altIndexArr = altIndexArr.slice(0, 1);
 
                                     for (var ndx = 0; ndx < altIndexArr.length; ndx++) {
                                         amndx = parseInt(altIndexArr[ndx]);