浏览代码

Fixed issue causing change event not to get triggered for decimal masks when a "." character is present in the field.

Dave Cadwallader 13 年之前
父节点
当前提交
5213c62a2b
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      js/jquery.inputmask.numeric.extensions.js

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

@@ -34,7 +34,9 @@ Optional extensions on the jquery.inputmask base
                         for (var i = 1; i < opts.digits; i++) {
                             if (nptStr[radixPosition + i]) nptStr = nptStr + "0";
                         }
-                        $input.val(nptStr);
+                        if (nptStr !== $input.val()) {
+                        	$input.val(nptStr);
+						}
                     }
                 }
             },