angular-input-masks icon indicating copy to clipboard operation
angular-input-masks copied to clipboard

Caret does not maintain position when editing value

Open Aslate49 opened this issue 10 years ago • 3 comments

This masked input seems to work great when entering values in succession, but when entering values in the middle of the string the caret typically jumps to the end of the input on reformatting. I would expect the caret to be after the character typed.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26041976-caret-does-not-maintain-position-when-editing-value?utm_campaign=plugin&utm_content=tracker%2F1022469&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1022469&utm_medium=issues&utm_source=github).

Aslate49 avatar Aug 21 '15 17:08 Aslate49

Sure, if you can improve this behaviour your pull request will be welcomed.

assisrafael avatar Aug 23 '15 10:08 assisrafael

#211

I've started something to solve this issue, for a while, it's working fine

viict avatar Jul 22 '16 21:07 viict

If you're using mask with numbers only, try using input type tel, the keyboard allows only number typing, and the caret positioning seems to work fine. Don't know how to explain this, since the creator claims it's supposed to work only on type text #157

rodrigoetoh avatar Feb 08 '17 12:02 rodrigoetoh