Last Updated: 02 Mar 2023 13:58 by ADMIN
Release R2.2023-Increment.1(15.Mar.2023)
Created on: 01 Mar 2023 16:12
Category: MaskedTextBox
Type: Bug Report
MaskedTextBox uncaught TypeError when initial value is invalid

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: Invalid initial value gracefully initializes the widget and simply doesn't display the invalid value.

2021.3.914: Invalid initial value "crashes" and prevents the rest of the page from initializing.