Looks like you are changing visibility on x1.  That might affect focus
logic if you focus out of xx to x1.

On 12/10/14, 6:59 AM, "WuThom" <[email protected]> wrote:

>
>Hi:
> 
>I have a puzzling problem.  At
>first, the TextInput component donot fire the focusIn Event,  then it
>fired the 
>focusOut event,  why?? bug??
> 
>test step:
>1. textinput xx get focus
>2. then pressed the tab key
>
> 
>textInput x1 do not fired the
>focusIn  event, but it fired the focusOut event.
>textInput xx is still
>the components that are
>currently gets focus , but did not
>show the cursor indicator. why??
> 
>example code:
>
><?xml version="1.0"
>encoding="utf-8"?>
><s:WindowedApplication
>xmlns:fx="http://ns.adobe.com/mxml/2009";
>   
>xmlns:s="library://ns.adobe.com/flex/spark"
>   
>xmlns:mx="library://ns.adobe.com/flex/mx" >
>
><fx:Script>
><![CDATA[
>import 
>mx.core.UIComponent;
>protected function
>xx_focusOutHandler(event:FocusEvent):void
>{
>x1.visible = false;
>}
>
>protected function
>x1_focusInHandler(event:FocusEvent):void
>{
>trace("x1 focus in");
>}
>
>protected function
>x1_focusOutHandler(event:FocusEvent):void
>{
>trace("x1 focus out");
>}
>
>]]>
></fx:Script>
>
>
><s:VGroup>
><s:TextInput id="xx"
>focusOut="xx_focusOutHandler(event)"/>
><s:TextInput id="x1"
>focusIn="x1_focusInHandler(event)"
>focusOut="x1_focusOutHandler(event)"/>
><s:TextInput 
>text="x2"/>
></s:VGroup>
></s:WindowedApplication>
> 
> 
> Thx
>Thom                                     

Reply via email to