Browse Source

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

Robin Herbots 13 years ago
parent
commit
8fbf3729ab
1 changed files with 4 additions and 2 deletions
  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(''))