0
我有一个带有tabIndex的按钮。该按钮包含一个文本框。 当我点击按钮的边缘并点击标签时,下一个项目被正确聚焦。 但是,当我点击文本框(不可编辑,不启用tab键,不启用tabindex),然后点击tab键时,它将焦点放在页面上的第一个对象上,即使父母的focusIn函数被触发,米聚焦设置父对象:如何防止闪光灯聚焦在儿童物体上,这会弄乱tabindex
parentObject:
addEventListener(FocusEvent.FOCUS_IN, focusIn);
private function focusIn(e:FocusEvent):void
{
//shows the child object (a textfield) has the focus
FlashConnect.trace(Main.instance.stage.focus);
//causes this focusIn function to be called again, but only once again, since then the focus does not change anymore
Main.instance.stage.focus = this;
//shows THIS parent object now has the focus
FlashConnect.trace(Main.instance.stage.focus);
//shows the correct tabIndex, which makes me expect the next item should be selected when I hit tab right?
FlashConnect.trace(Main.instance.stage.focus.tabIndex);
}
任何想法如何解决这个问题?