ngx-mask
ngx-mask copied to clipboard
the prefix value is duplicated when an invalid character is entered
🐞 bug report
Is this a regression?
No. This behavior worked in the previous version
Description
If the cursor is positioned before the prefix, then entering an invalid character will duplicate the prefix value
🔬 Minimal Reproduction
the problem is reproduced in your demo. I checked for version 11.1.5 and in my project version 8.2.0, also I reproduced this issue on stackblits with ngx-mask version 8.1.6
steps to reproduce:
- enter some characters

- highlight value and try deleting using backspace
the cursor will be before the prefix

- enter any invalid character (not numbers), for example the letter "f"
numbers from the prefix will be duplicated
Angular Version: 8 - 11