Welcome to the Angular feedback portal. We’re happy you’re here! If you have feedback on how to improve the Angular, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Hi,
I just ran into a situation where a MaskedTextBox linked to a Reactive Forms control was being validated even before control was touched.
After some investigation, I found out the root cause: blur event was being invoked right after control was created.
However I noticed this only happened if placeholder is set.
So, basically to reproduce this bug:
1) Create a reactive form control linked to a MaskedTextBox
2) Set MaskedTextBox placeholder
3) Set an event handler for blur event and insert some code in it with a visual effect (for instance, set MaskedTextBox cssClass property)
That's it. Please let me know if you are unable to reproduce the above and I'll be happy to attach some code example in which it occurs.
Last but not least, I managed to workaround this issue by checking the event property of blur event argument:
I noticed that, on the "not interacted" blur invocation, this event property is undefined. So, basically, this is similar to checking if the blur was "interacted" or not (as there is no "interacted" property in FocusOutEventArgs).
Best regards,
Marco.