A MaskedTextBox where the initial value is invalid(e.g. unsanitized data from some source, data saved prior to implementing mask, etc) throws "Uncaught TypeError: Cannot read properties of undefined (reading 'removeClass')" during initialization which breaks the entire page due to the interruption.
Introduced in 2021 R3(2021.3.914) where it "crashes" due to the value being set and the error being triggered *before* the _validationIcon is initialized.
Here are dojo examples showing the problem:
2021.2.616: https://dojo.telerik.com/@Stephen/uVetAFEr: Invalid initial value gracefully initializes the widget and simply doesn't display the invalid value.
2021.3.914: https://dojo.telerik.com/@Stephen/ejOxoqIx: Invalid initial value "crashes" and prevents the rest of the page from initializing.
Just upgraded our version from 2022.1.119 to 2022.2.802.
A user just called us that they can't use our maskedtextboxes anymore.
After further inspection it seems the control is now broken when using client side validation, more specifically the maxlength one.
When the length of the mask >= the max length (from the validation), then you can only replace characters. Normal key inputs don't work anymore.
If you look at the example, when you focus the inputfield, you can no longer type in it.
If you were to increase the maxlength validation by one, then the maskedtextbox will work as expected again.
1. Navigate to: https://dojo.telerik.com/@PMcDonou/UVIXEPOk
2. Enter a space in maskedtextbox
Result: space is accepted as a valid character
Expected: space should be prevented
Workaround: Use '\u2000' for promptChar instead of space