# Tab Order focusManager - stuck on button and comboBox

**URL:** <https://forum.kirupa.com/t/tab-order-focusmanager-stuck-on-button-and-combobox/281739>\
**Category:** flash\
**Created:** [February 12, 2009, 8:18pm UTC](https://forum.kirupa.com/t/tab-order-focusmanager-stuck-on-button-and-combobox/281739 "2009-02-12T20:18:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_Banghart](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@Rick\_Banghart](https://forum.kirupa.com/u/Rick_Banghart)\
**Post date:** [February 12, 2009, 8:18pm UTC](https://forum.kirupa.com/t/tab-order-focusmanager-stuck-on-button-and-combobox/281739/1 "2009-02-12T20:18:55Z")

</div>

My application has many data entry forms using a variety of textAreas, textFields, comboBoxes and buttons. Each form consists of a MovieClip with a number of related input fields added as children of that MovieClip. I want the user to be able to tab through the fields of each form. I also want to identify one of the buttons on each form as the “default button” which should dispatch a click event when the enter key is pressed.

For each entry object I have set tabEnabled = true and assigned a tabIndex value. Tabbing seems to work across textFields and textAreas, but gets “stuck” at comboBoxes and buttons. I thought that the tab order might be affected by the fact that comboBoxes and buttons have children, so I set tabChildren = false for comboBox and buttons.

I set up an eventListener for FocusEvent.KEY\_FOCUS\_CHANGE and had the listener function do this:

```auto

function focusHandler(e:FocusEvent):void {
    var ob = e.relatedObject;
    trace(ob.focusManager.getNextFocusManagerComponent());
}

```

The trace output shows the button or comboBox that is about to receive focus, but once the button or comboBox gets focus the eventListener no longer receives the KEY\_FOCUS\_CHANGE event.

I also tried creating a FocusManager object:

```auto

    var fmUnit:FocusManager = new FocusManager(unitForm);
    var btn = unitForm.getChildByName("submit");
    fmUnit.defaultButton = btn;

```

This succeeds in setting the button as a default button, but still the tab progress gets stuck.

Any help would be apreciated.
