ngx-mask: Buggy on Mobile devices
When typing, the cursor moves to a position before the last inserted character (Galaxy S5, Galaxy S7, Moto G4 Play).
In older devices (Galaxy J2 mini), the cursor doesn’t moves as well and all the characters are inserted to the right of the cursor.
You can test it in: https://jsdaddy.github.io/ngx-mask/
Some other plugins, seems to have fixed it by changing the input.selectionStart
usage by input.selectionEnd
.
As you can see, selectionStart
is used here:
And also used here:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 26
For numeric input just use input type ‘tel’ like
<input type="tel" mask="000 000 000" />
It will work smoothly on mobile devices