Browse Source

setvalue fix - do not show mask when value is empty

Robin Herbots 15 years ago
parent
commit
a24bb59480
1 changed files with 3 additions and 1 deletions
  1. 3 1
      jquery.inputmask.js

+ 3 - 1
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.1.0
+Version: 0.1.1
    
 This plugin is based on the masked input plugin written by Josh Bush (digitalbush.com)
 */
@@ -245,6 +245,8 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
             if (tests) {
                 var buffer = _buffer.slice();
                 checkVal(el, buffer, true);
+                if (el.val() == _buffer.join(''))
+                        el.val('');
             }
         }