|
|
@@ -3,7 +3,7 @@
|
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
|
* Copyright (c) 2010 - 2013 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 2.1.9
|
|
|
+* Version: 2.1.10
|
|
|
*/
|
|
|
|
|
|
(function ($) {
|
|
|
@@ -654,12 +654,12 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function caret(input, begin, end) {
|
|
|
- if (!$(input).is(':visible')) {
|
|
|
- return;
|
|
|
- }
|
|
|
+ function caret(input, begin, end) {
|
|
|
var npt = input.jquery && input.length > 0 ? input[0] : input;
|
|
|
if (typeof begin == 'number') {
|
|
|
+ if (!$(input).is(':visible')) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
end = (typeof end == 'number') ? end : begin;
|
|
|
if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode
|
|
|
if (npt.setSelectionRange) {
|
|
|
@@ -674,6 +674,9 @@
|
|
|
npt.focus();
|
|
|
if (android && end != npt.selectionEnd) caretposCorrection = { begin: begin, end: end };
|
|
|
} else {
|
|
|
+ if (!$(input).is(':visible')) {
|
|
|
+ return { begin: 0, end: 0 };
|
|
|
+ }
|
|
|
var caretpos = android ? caretposCorrection : null, caretposCorrection = null;
|
|
|
if (caretpos == null) {
|
|
|
if (npt.setSelectionRange) {
|
|
|
@@ -1264,7 +1267,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2013 Robin Herbots
|
|
|
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-Version: 2.1.9
|
|
|
+Version: 2.1.10
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -1361,7 +1364,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2012 Robin Herbots
|
|
|
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-Version: 2.1.9
|
|
|
+Version: 2.1.10
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -1854,7 +1857,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2013 Robin Herbots
|
|
|
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-Version: 2.1.9
|
|
|
+Version: 2.1.10
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|