Skip navigation
Currently Being Moderated

Flex 3 ComboBox Not Firing Change Event

Aug 9, 2011 10:47 AM

I have run into a peculiar behavior with the Flex 3 ComboBox. If you have a combo box that initially defaults to no item selected and a required validator, the behavior is incorrect given one particular set of user actions. See the below code which is a minimal application I came up with the reproduce the problem.


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="" layout="absolute" minWidth="955" minHeight="600">
            import mx.controls.Alert;
            private function boxChanged(event:Event):void {
      "selection changed");
    <mx:Validator source="{box}" property="text" required="true"/>
        <mx:ComboBox id="box" change="boxChanged(event)" selectedIndex="-1">
                <mx:Object label="A1" stuff="xxxx"/>
                <mx:Object label="A2" stuff="xxxx"/>
                <mx:Object label="B1" stuff="xxxx"/>
                <mx:Object label="C1" stuff="xxxx"/>
                <mx:Object label="C2" stuff="xxxx"/>


If you use only the mouse to select an item from the combo box, it works fine. If you tab into it and use keystrokes to select an item, it works fine. However, if you click the down arrow with the mouse to display the list and then hit a key (e.g. A or B or C), it immediately selects that item in the list (normally, it just highlights the first matching entry and you have to click or hit enter to actually select it) but does not dispatch the change event. Once you have selected the item the first time, the same click and keypress combination works correctly ... it only fails the first time when the combo box doesn't have an item selected. And it only happens if there is a required validator on the field ... if you remove the validator, it works correctly.


Any ideas what is going on? And any suggestions for a workaround that achieves the same result but bypasses this issue (which appears to me to be a bug in the ComboBox control)? Upgrading to a newer version, sadly, is not an option for us at this time. Thanks.

  • Currently Being Moderated
    Feb 1, 2012 6:18 AM   in reply to wbailey4

    Hi wbailey4,


    i have a flex 3 project someone developed it and he wirte the code such as the below example:


                id="providerItem" width="100%"

                label="Provider"  >







                    styleName="formField" tabIndex="1105"/>




    i have similar problem as you mentioned above, but it seems he use a different approach to create the ComboBox in the mxml file, and i added the prompt property such as you mentioned befire, but unfortunately it still not working, do you have any idea !!!...


    thanks in advance,

    Mark as:
  • Currently Being Moderated
    Jan 16, 2014 6:36 AM   in reply to Wasim00

    Try using the valueComit property on mx combobox.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points