I have an application Ext JS 6.5.3 (classic toolkit) and I'm trying to build a textfield with an inputMask (phone mask), following this documentation:

It works quite fine when I type each character one by one (only allows fill the input field with numbers, which is OK).
The problem is when I copy-paste text, either only numbers or alpha-numeric string.

I've realize that the same code works OK using "Modern" toolkit (for instance, Ext JS [modern] - Triton").

Steps to reproduce:

  1. Fill the input text with this string: "Mask: (999)"
    Only numbers should be allowed
  2. Remove previous string
    The input mask is broken

Here is the Fiddler: