Browse Source

bugfix for mouseenter event

Robin Herbots 15 years ago
parent
commit
b34f177af0
1 changed files with 3 additions and 1 deletions
  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);
                             caret(input, pos);
                     }, 0);
                     }, 0);
                 }).bind("mouseenter", function() {
                 }).bind("mouseenter", function() {
-                    if (!input.hasClass('focus') && input.val().length == 0)
+                    if (!input.hasClass('focus') && input.val().length == 0) {
+                        buffer = _buffer.slice();
                         writeBuffer();
                         writeBuffer();
+                    }
                 }).bind("blur", function() {
                 }).bind("blur", function() {
                     input.removeClass('focus');
                     input.removeClass('focus');
                     if (input.val() == _buffer.join('')) {
                     if (input.val() == _buffer.join('')) {