Robin Herbots 13 年 前
コミット
af287d39a3
1 ファイル変更1 行追加1 行削除
  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)