Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-22502

DateField component, when Editable, and using a DateValidator, cause 3 "invalid" events to fire whenever focus is lost on the DateField

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK 3.4 (Release)
    • None
    • mx: DateField
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: