Browse Source

fix bug in clearOnLostFocus option on blur

Robin Herbots 14 years ago
parent
commit
f44595ea46
1 changed files with 2 additions and 2 deletions
  1. 2 2
      jquery.inputmask.js

+ 2 - 2
jquery.inputmask.js

@@ -3,7 +3,7 @@ Input Mask plugin for jquery
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 Robin Herbots
 Copyright (c) 2010 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 0.3.1
+Version: 0.3.2
  
  
 This plugin is based on the masked input plugin written by Josh Bush (digitalbush.com)
 This plugin is based on the masked input plugin written by Josh Bush (digitalbush.com)
 */
 */
@@ -415,7 +415,7 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                     if (_val.call(input) != undoBuffer) {
                     if (_val.call(input) != undoBuffer) {
                         input.change();
                         input.change();
                     }
                     }
-                    if (_val.call(input) == _buffer.join(''))
+                    if (opts.clearMaskOnLostFocus && _val.call(input) == _buffer.join(''))
                         _val.call(input, '');
                         _val.call(input, '');
                 }).bind("focus.inputmask", function() {
                 }).bind("focus.inputmask", function() {
                     var input = $(this);
                     var input = $(this);