Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wrong caret position #32

Open
MarkOfNY opened this issue Jun 17, 2015 · 4 comments · May be fixed by #136
Open

Wrong caret position #32

MarkOfNY opened this issue Jun 17, 2015 · 4 comments · May be fixed by #136

Comments

@MarkOfNY
Copy link

Hi,

Very nice component. I am using it for a date mask. It works fine on Android 4.4+ and iOS, but having issues with it on Android 4.2.2 . Below is the input code:

input type="text" placeholder="Date of Birth (mm/dd/yyyy)" restrict="select" mask="19/39/9999" ng-model="form.dob"

I'm trying to enter a date of 12/02/1995. After I enter 12 and then hit 0, it correctly puts the "/" in front of the zero becoming "12/0", but the caret position is not at the end of the text, but right before the last digit. Even if I try to change the caret position by tapping at the end of the text, it doesn't help. I have to change to another input and then back. I hope there is a fix for this. Please advise. Thanks.

@MarkOfNY
Copy link
Author

Guys, any input on this? I'd love to keep using the component, but this is an issue.

@hardikkaji
Copy link

Check this for fixing issue: #127

weberamaral added a commit to weberamaral/ngMask that referenced this issue Mar 18, 2017
In all browsers in android devices the keyboard cursor is in the wrong position in fields that have
a mask

closes candreoliveira#32 candreoliveira#58 candreoliveira#127
@leuterio
Copy link

This worked for me:
Inside the input tag add:
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"

@mathportillo
Copy link

While #136 is not merged, a quick temp fix is to install the dependency directly from that commit. The following should work on both npm and bower:

"ngMask": "git@github.com:candreoliveira/ngMask.git#a73544ca3a3a2b35558d25ad331235ff65c2fcb2",

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants