Skip to content

Commit

Permalink
Phone Mask Cursor Issue on Chrome on some Androids.. RobinHerbots#1490
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinHerbots committed Feb 22, 2017
1 parent c9369e1 commit cf4695b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- initialization

### Fixed
- Phone Mask Cursor Issue on Chrome on some Androids.. #1490
- min value issue fix #1177
- static is a reserved keyword #1479
- hasOwnProperty check missing in reverseTokens (numericInput) #1486
Expand Down
13 changes: 9 additions & 4 deletions js/inputmask.js
Original file line number Diff line number Diff line change
Expand Up @@ -1312,10 +1312,10 @@
//return is false or a json object => { pos: ??, c: ??} or true
rslt = test.fn != null ?
test.fn.test(chrs, getMaskSet(), position, strict, opts, isSelection(pos)) : (c === test.def || c === opts.skipOptionalPartCharacter) && test.def !== "" ? //non mask
{
c: getPlaceholder(position, test, true) || test.def,
pos: position
} : false;
{
c: getPlaceholder(position, test, true) || test.def,
pos: position
} : false;

if (rslt !== false) {
var elem = rslt.c !== undefined ? rslt.c : c;
Expand Down Expand Up @@ -1729,6 +1729,11 @@
input.inputmask._valueSet(buffer.join(""));
if (caretPos !== undefined && (event === undefined || event.type !== "blur")) {
caret(input, caretPos);
if (android && event.type === "input") {
setTimeout(function () {
caret(input, caretPos);
}, 0);
}
} else renderColorMask(input, buffer, caretPos);
if (triggerInputEvent === true) {
skipInputEvent = true;
Expand Down

0 comments on commit cf4695b

Please sign in to comment.