浏览代码

maxlength tweak

Robin Herbots 12 年之前
父节点
当前提交
9f7cd630aa
共有 2 个文件被更改,包括 1 次插入1733 次删除
  1. 1 1
      js/jquery.inputmask.js
  2. 0 1732
      qunit/tests.js~

+ 1 - 1
js/jquery.inputmask.js

@@ -985,7 +985,7 @@
                                 }
                                 }
                             });
                             });
                         }
                         }
-                        if (getMaskLength() > maxLength && maxLength > -1) { //FF sets no defined max length to -1 
+                        if (getMaskLength() >= maxLength && maxLength > -1) { //FF sets no defined max length to -1 
                             if (maxLength < getActiveBufferTemplate().length) getActiveBufferTemplate().length = maxLength;
                             if (maxLength < getActiveBufferTemplate().length) getActiveBufferTemplate().length = maxLength;
                             if (getActiveMaskSet()['greedy'] == false) {
                             if (getActiveMaskSet()['greedy'] == false) {
                                 getActiveMaskSet()['repeat'] = Math.round(maxLength / getActiveBufferTemplate().length);
                                 getActiveMaskSet()['repeat'] = Math.round(maxLength / getActiveBufferTemplate().length);

文件差异内容过多而无法显示
+ 0 - 1732
qunit/tests.js~