ソースを参照

bugfix for mouseenter event

Robin Herbots 15 年 前
コミット
b34f177af0
1 ファイル変更3 行追加1 行削除
  1. 3 1
      jquery.inputmask.js

+ 3 - 1
jquery.inputmask.js

@@ -175,8 +175,10 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                             caret(input, pos);
                     }, 0);
                 }).bind("mouseenter", function() {
-                    if (!input.hasClass('focus') && input.val().length == 0)
+                    if (!input.hasClass('focus') && input.val().length == 0) {
+                        buffer = _buffer.slice();
                         writeBuffer();
+                    }
                 }).bind("blur", function() {
                     input.removeClass('focus');
                     if (input.val() == _buffer.join('')) {