[Custom Input Masks] [Custom Input Mask] Bug when deleting character in the middle of the text
Forge component by Sara Gonçalves


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


Hi Ana,

Sry for the late reply but the only way that I saw of this not happening is by using a placeholder. Something like this:  placeholder: '_'



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.