Completed
Last Updated: 26 Jul 2018 13:40 by ADMIN
ADMIN
Dilyan Traykov
Created on: 27 Apr 2018 14:33
Category: MaskedInput
Type: Bug Report
0
MaskedInput: Text is not displayed correctly when Mask is changed runtime to "" (no-mask).
 MaskedTextInput with Mask="(###)-###-####" and EmptyContent="Type digits" , type a single digit, for example 6 in the control.

Value becomes 6 and Text becomes '(6__)-___-____'.

 Mask is changed runtime to empty string (runtime) and the focus is out of the MaskedInput the control.

Value continues to be 6 but Text becomes '6' according to the new MASK.

 EmptyContent string is shown, although Text is 6.

Expected: Text is shown in the control '6'. 

Same issue in NumericInput and CurrencyInput.
=======================================
=======================================

The following workaround could be considered.

    public class CustomTextInput : RadMaskedTextInput
    {
        protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
        {
            if (e.Property.Name == "Mask")
            {
                if (e.NewValue.ToString() == string.Empty)
                {
                    this.LiteralPositions.Clear();
                }
            }

            base.OnPropertyChanged(e);
        }
    }
1 comment
ADMIN
Vera
Posted on: 26 Jul 2018 13:40
The fix for this issue will be available in the next LIB version (2018.2.730). It will also be included in our official version – R3 2018, scheduled for the mid of September.