igniteui-angular
igniteui-angular copied to clipboard
Mask directive throws when value is deleted
Description
I have mask like this:
<igx-input-group>
<input igxInput [igxMask]="'###-##-####'"/>
</igx-input-group>
When mask has some value if you select some numbers in the value and delete them by delete key exception is thrown in the console ERROR TypeError: Cannot read properties of undefined (reading 'substring'). After this the input is broken and does not accept any input.
- igniteui-angular version: 14.0.5
- browser: all
Steps to reproduce
- Create
igx-input-groupwithigxMaskas described above. - Put a value in the input, e.g. 123-45-6789
- Select the entire value and click
deletekey. - Observe the console in the DevTools.
- Try to enter some value.
Result
Error is thrown in the console and input does not accept any new values.
Expected result
No errors should be thrown in the console and input should accept new values as specified in the mask.
There has been no recent activity and this issue has been marked inactive.