浏览代码

move the change event to later in execution, ... just to be sure and correctness

Robin Herbots 13 年之前
父节点
当前提交
8fbf3729ab
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      jquery.inputmask.js

+ 4 - 2
jquery.inputmask.js

@@ -3,7 +3,7 @@ Input Mask plugin for jquery
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 0.5.3e
+Version: 0.5.4
  
 This plugin is based on the masked input plugin written by Josh Bush (digitalbush.com)
 */
@@ -514,7 +514,9 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                         var $input = $(this), input = this, nptValue = input._valueGet();
                         $input.removeClass('focus.inputmask');
                         if (nptValue != undoBuffer) {
-                            $input.change();
+                            setTimeout(function() { //move the change event to later, ...
+                                $input.change();
+                            }, 0);
                         }
                         if (opts.clearMaskOnLostFocus) {
                             if (nptValue == _buffer.join(''))