浏览代码

fix for issue 6 where the non-masked items are valid for the masked items.
a mask like input.inputmask('0506-999999'); is now behaving corectly

Robin Herbots 14 年之前
父节点
当前提交
ace3ae7245
共有 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.4.6a
+Version: 0.4.6b - dev
  
 This plugin is based on the masked input plugin written by Josh Bush (digitalbush.com)
 */
@@ -383,6 +383,8 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                                 if (lastMatch == checkPosition) //once outsync the nonmask cannot be the lastmatch
                                     lastMatch = pos;
                                 checkPosition = pos;
+                                if(inputValue.charAt(i) == getBufferElement(buffer, pos))
+                                	break;
                             }
                         }
                     }