JsDaddy / ngx-mask

Angular Plugin to make masks on form fields and html elements.
https://jsdaddy.github.io/ngx-mask
MIT License
1.15k stars 298 forks source link

Cursor change place when try to delete characters #1310

Closed DanaDovzh closed 6 months ago

DanaDovzh commented 7 months ago

Hi, I use ngx-mask 17.0.4 and angular 16.0.1 I am using this package for phone numbers but I have a problem when I want to remove characters the cursor changes position but if I remove the prefix in the properties or use a mask without any special characters like 0000000000 it works fine but I need prefix and formatting for the mask

<input type="text"
prefix="+7"
mask=" (000) 000-0000"
[showMaskTyped]="true" />
andriikamaldinov1 commented 6 months ago

@DanaDovzh Thanks for using Ngx-mask. Please update to latest version. It example all work as expected - https://stackblitz.com/edit/stackblitz-starters-qfvsry?file=src%2Fmain.ts