[Custom Input Masks] [Custom Input Mask] Bug when deleting character in the middle of the text

Forge Component
(43)
Published on 2019-04-22 by Marcelo Ferreira
43 votes
Published on 2019-04-22 by Marcelo Ferreira

Hi,

I'm currently facing a bug when I delete an alphanumeric character in a input that contains both alphanumeric and numeric characters.

Suppose that I have the following in the input: GHI1234. If I place my cursor after the "I" and hit backspace, and then go to the end of the string and hit backspace multiple space multiple times, I will see the following sequence:

  • GH124 (please notice this should be GH123)
  • GH14
  • GH4 -> I'm not able to delete any more characters at this point, if I have my cursor placed after the "4"

Please note that this issue only happens when deleting one of the alphanumeric characters - if I, for instance, delete the "2" in the original input, it works fine.

I am using the following for the AdvancedOptions (and I left the MaskDefinitions field empty):

"{regex:'([Gg][A-Za-z]{2}\\d{4})', placeholder: '', autoUnmask:true, showMaskOnFocus: false, showMaskOnHover: false, casing: 'upper'}"

Does anyone know what might be the issue in here?

Thanks in advance,

Ana Santos