Browse Source

Update dev

Robin Herbots 13 years ago
parent
commit
af287d39a3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      js/jquery.inputmask.js

+ 1 - 1
js/jquery.inputmask.js

@@ -901,7 +901,7 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                                     }
                                     if (opts.insertMode == true) {
                                         var lastUnmaskedPosition = getMaskLength();
-                                        while (getBufferElement(buffer, lastUnmaskedPosition) != getPlaceHolder(lastUnmaskedPosition) && lastUnmaskedPosition >= p) {
+                                        while (getBufferElement(buffer, lastUnmaskedPosition) != getPlaceHolder(lastUnmaskedPosition) && lastUnmaskedPosition >= p && lastUnmaskedPosition > 0) {
                                             lastUnmaskedPosition = seekPrevious(buffer, lastUnmaskedPosition);
                                         }
                                         if (lastUnmaskedPosition >= p)