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);
}
任何想法如何解決這個問題?