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

Cant replace first characters correctly #121

Open bekerov opened 7 years ago

bekerov commented 7 years ago

Trying replace number from start. Cant do it

2016-11-17_21-55-30

PhiLhoSoft commented 7 years ago

I don't understand your problem from your Gif. What are you trying to do? How does if fails?

belizariogr commented 7 years ago

If the pointer is on first position, the correct action is replace character, not add on beginning and remove the last.

PhiLhoSoft commented 7 years ago

Well, that's not how typing in browsers work... It is still a regular input field. To replace a character, either you delete then insert the new one, or you select the char to replace and type the new one.

Problem with ngMask: if you select 2 chars or more, after typing the first replacement char, it will jump to the end of the field, so you can't type the second replacement char right away.

dabyland commented 6 years ago

Having the same type of issues. Editing anything in the field will move your input cursor to the very end, regardless of the action. So erasing even one character/number from the middle will move your input cursor. Is there anything in the works to fix this?

Baukaalm commented 6 years ago

A similar problem