|
|
@@ -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.15
|
|
|
+* Version: 2.1.16
|
|
|
*/
|
|
|
|
|
|
(function ($) {
|
|
|
@@ -649,7 +649,8 @@
|
|
|
return input._valueGet();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ var caretSavePoint;
|
|
|
function caret(input, begin, end) {
|
|
|
var npt = input.jquery && input.length > 0 ? input[0] : input, rabge;
|
|
|
if (typeof begin == 'number') {
|
|
|
@@ -659,11 +660,13 @@
|
|
|
end = (typeof end == 'number') ? end : begin;
|
|
|
if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode
|
|
|
if (npt.setSelectionRange) {
|
|
|
- if (android)
|
|
|
+ if (android) {
|
|
|
setTimeout(function () {
|
|
|
npt.selectionStart = begin;
|
|
|
- npt.selectionEnd = end;
|
|
|
- }, 0);
|
|
|
+ npt.selectionEnd = android ? begin : end;
|
|
|
+ }, 10);
|
|
|
+ caretSavePoint = { "begin": begin, "end": end };
|
|
|
+ }
|
|
|
else {
|
|
|
npt.selectionStart = begin;
|
|
|
npt.selectionEnd = end;
|
|
|
@@ -677,7 +680,7 @@
|
|
|
}
|
|
|
} else {
|
|
|
if (!$(input).is(':visible')) {
|
|
|
- return { begin: 0, end: 0 };
|
|
|
+ return { "begin": 0, "end": 0 };
|
|
|
}
|
|
|
if (npt.setSelectionRange) {
|
|
|
begin = npt.selectionStart;
|
|
|
@@ -687,7 +690,7 @@
|
|
|
begin = 0 - range.duplicate().moveStart('character', -100000);
|
|
|
end = begin + range.text.length;
|
|
|
}
|
|
|
- return { begin: begin, end: end };
|
|
|
+ return { "begin": begin, "end": end };
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -1045,7 +1048,6 @@
|
|
|
skipKeyPressEvent = false;
|
|
|
|
|
|
var input = this, k = e.keyCode, pos = caret(input);
|
|
|
-
|
|
|
determineInputDirection(input, pos);
|
|
|
|
|
|
//backspace, delete, and escape get special treatment
|
|
|
@@ -1159,7 +1161,7 @@
|
|
|
return true;
|
|
|
} else {
|
|
|
if (k) {
|
|
|
- $input.trigger('input');
|
|
|
+ //$input.trigger('input');
|
|
|
|
|
|
var pos = caret(input), maskL = getMaskLength(buffer), writeOutBuffer = true;
|
|
|
clearBuffer(buffer, pos.begin, pos.end);
|
|
|
@@ -1236,6 +1238,9 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(android) {
|
|
|
+ caret(input, caretSavePoint.begin, caretSavePoint.end);
|
|
|
+ }
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
}
|
|
|
@@ -1263,7 +1268,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.15
|
|
|
+Version: 2.1.16
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -1360,7 +1365,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.15
|
|
|
+Version: 2.1.16
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -1853,7 +1858,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.15
|
|
|
+Version: 2.1.16
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|