ソースを参照

fix change event

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

+ 3 - 3
js/jquery.inputmask.js

@@ -533,6 +533,9 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                 }).bind("blur.inputmask", function() {
                     var $input = $(this), input = this, nptValue = input._valueGet();
                     $input.removeClass('focus.inputmask');
+                    if (nptValue != undoBuffer) {
+                        $input.change();
+                    }
                     if (opts.clearMaskOnLostFocus) {
                         if (nptValue == _buffer.join(''))
                             input._valueSet('');
@@ -553,9 +556,6 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                             }
                         }
                     }
-                    if (input._valueGet() != undoBuffer) {
-                        $input.change();
-                    }
                 }).bind("focus.inputmask", function() {
                     var $input = $(this), input = this;
                     $input.addClass('focus.inputmask');