Hi Rich,

 

When closed - a popup will return focus to whatever element had it before the popup was opened.

So, even though the focus cursor is showing in the second field - the focus isn’t getting completely updated in the focus manager to the second textField before the Alert popup open and gets focus.

 

It’s a timing issue - try delaying your focusOut handler with a callLater() to give the focus manager time to switch focus to the next field in the main app - then it should function the way you want.

 

<mx:TextInput id="t1" text="Hello" focusOut="callLater(doSomething)" />

 

Let me know if that does the trick

 

regards,

peter

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Rich Tretola
Sent: Tuesday, September 05, 2006 11:33 AM
To: [email protected]
Subject: [flexcoders] Re: FocusOut ??

 

Anyone from Adobe ever have a chance to look into this?

Rich

On 8/31/06, Rich Tretola <[EMAIL PROTECTED]com> wrote:
> I am having an issue where the focusOut on a text input will run the
> function that I have assigned but will then return focus to the
> calling text input. The following code shows this occuring in a
> simple example. Just put your focus on the top text input and then
> tab out. You will see the alert and you can see the cursor in the 2nd
> text input underneath the alert but, closing the alert then returns
> the focus back to the top text input.
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
> <mx:Script>
> <![CDATA[
> private function doSomething():void{
> mx.controls.Alert.show('t1 = ' + t1.text);
> }
> ]]>
> </mx:Script>
>
>
> <mx:TextInput id="t1" text="Hello" focusOut="doSomething()" />
> <mx:TextInput id="t2" />
> </mx:Application>
>
>
> Rich
>

--
Rich Tretola
<mx:EverythingFlex/>
http://www.EverythingFlex.com

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to