浏览代码

https://github.com/gadr90/jquery.inputmask/commit/c8c284a1d6aa5f8ca12a048e497c857e607e2e54

Robin Herbots 12 年之前
父节点
当前提交
b436b09b97
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      js/jquery.inputmask.js

+ 4 - 1
js/jquery.inputmask.js

@@ -1,7 +1,7 @@
 /**
 * @license Input Mask plugin for jquery
 * http://github.com/RobinHerbots/jquery.inputmask
-* Copyright (c) 2010 - 2012 Robin Herbots
+* Copyright (c) 2010 - 2013 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Version: 0.0.0
 */
@@ -535,6 +535,9 @@
             }
 
             function caret(input, begin, end) {
+				if (!$(input).is(':visible')) {
+                    return;
+                }
                 var npt = input.jquery && input.length > 0 ? input[0] : input;
                 if (typeof begin == 'number') {
                     end = (typeof end == 'number') ? end : begin;