ソースを参照

correct greedy setting if needed

Robin Herbots 13 年 前
コミット
0441a8b009
1 ファイル変更3 行追加0 行削除
  1. 3 0
      js/jquery.inputmask.js

+ 3 - 0
js/jquery.inputmask.js

@@ -533,6 +533,9 @@
                 var $input = $(el);
                 if (!$input.is(":input")) return;
 
+      		//correct greedy setting if needed
+                opts.greedy = opts.greedy && opts.repeat > 0;
+
                 //handle maxlength attribute
                 var maxLength = $input.prop('maxLength');
                 if (getMaskLength() > maxLength && maxLength > -1) { //FF sets no defined max length to -1