ソースを参照

fix commit when still focus

Robin Herbots 11 年 前
コミット
6d97289de1

ファイルの差分が大きいため隠しています
+ 44 - 44
dist/inputmask/jquery.inputmask.js


+ 1 - 1
dist/jquery.inputmask.bundle.js

@@ -1511,7 +1511,7 @@
                     $el.closest('form').bind("submit", function () { //trigger change on submit if any
                         if (valueOnFocus != getBuffer().join('')) {
                             $el.change();
-                        }
+                        } else $el[0]._valueSet(''); //clear masktemplete on submit and still has focus
                         if (opts.autoUnmask && opts.removeMaskOnSubmit) {
                             $el.inputmask("remove");
                         }

ファイルの差分が大きいため隠しています
+ 55 - 55
dist/jquery.inputmask.bundle.min.js


+ 1 - 1
js/jquery.inputmask.js

@@ -1511,7 +1511,7 @@
                     $el.closest('form').bind("submit", function () { //trigger change on submit if any
                         if (valueOnFocus != getBuffer().join('')) {
                             $el.change();
-                        }
+                        } else $el[0]._valueSet(''); //clear masktemplete on submit and still has focus
                         if (opts.autoUnmask && opts.removeMaskOnSubmit) {
                             $el.inputmask("remove");
                         }