Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 3.4 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Browser: Firefox 3.x
Language Found: English
Description
Steps to reproduce:
1. Create DateField component
2. Set "editable" property of DateField component to "true"
3. Add a DateValidator for the "text" property of the DateField component, triggering on the valueCommit of the DateField.
Actual Results:
The "invalid" event of the DateValidator is fired 3 times whenever the DateField loses focus when an invalid date has been entered.
Expected Results:
The "invalid" event only fires once when losing focus on the DateField.
Workaround (if any):
N/A
Research:
This seems to be caused by the fact that the DateField component is actually a descendant of ComboBase, and implements a TextInput. When focus is lost, the focusOut event occurs at each level (DateField, ComboBase, and TextInput), which in turn ends up firing a valueCommit event for each of those levels. Therefore a DateValidator is triggered 3 times for an invalid date.