candreoliveira / ngMask

Best Angular mask alternative! No jQuery, pure JS. About ~6kb!
http://candreoliveira.github.io/#/ngMask
ISC License
419 stars 171 forks source link

Wrong caret position #32

Open MarkOfNY opened 9 years ago

MarkOfNY commented 9 years ago

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 commented 9 years ago

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

hardikkaji commented 7 years ago

Check this for fixing issue: https://github.com/candreoliveira/ngMask/issues/127

leuterio commented 7 years ago

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

mathportillo commented 7 years ago

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",