ソースを参照

setvalue fix - do not show mask when value is empty

Robin Herbots 15 年 前
コミット
a24bb59480
1 ファイル変更3 行追加1 行削除
  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('');
             }
         }