Hello,
I observed an unexpected behavior in the following scenario. Is this a planned behavior?
SfMaskedTextBox Component
FloatLabelType=Auto
Placeholder = "some text"
ShowClearButton = true
Mask=""
Observation:
In the <label> HTML element the e-label-bottom class is injected when the object is created.
When the textbox is active, e-label-top is injected and e-label-bottom is removed.
When the textbox is empty and inactive, e-label-bottom is injected and e-label-top is removed.
Scenario:
Activate the textbox.
Placeholder moves above the textbox...e-label-top injected
Type some text.
Click the clear button or backspace over the typed text.
Placeholder stays above the textbox...e-label-bottom injected
Deactivate the textbox...e-label-bottom is injected
Peter
Thank you for the prompt response. I accept that this is the planned behavior however the inconsistent usage of e-label-top and e-label-bottom makes it hard to correctly style the <label> element.
My code does some styling manipulation on the Placeholder based on whether it is being shown inside the textbox or above the textbox. This styling triggers off the e-label-top and e-label-bottom classes. This only applies to FloatLabelType = Auto. In Always mode e-label-top is always present. In None mode the <label> element isn't present.
The behavior I noted in the Scenario below results in the situation when e-label-bottom is injected in the <label> element when the Placeholder is shown above the textbox. The inconsistency just adds complexity to by custom styling efforts.
And, just to provide additional details...when the Scenario below is executed when a Mask is applied, the e-label-top class remains in the <label> element after entering text and clicking the clear button. This is the behavior I would expect regardless of the Mask property setting.
Thanks for your help.
Peter