igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Mask directive throws when value is deleted

Open wnvko opened this issue 3 years ago • 1 comments

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

  1. Create igx-input-group with igxMask as described above.
  2. Put a value in the input, e.g. 123-45-6789
  3. Select the entire value and click delete key.
  4. Observe the console in the DevTools.
  5. 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.

wnvko avatar Jul 13 '22 19:07 wnvko

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Sep 17 '22 00:09 github-actions[bot]