« Some notes about using OpenAMF Thank you Macromedia »

October 03, 2005

Flex tab focus issue with 2 popups open

I ran into an issue where opening one popup window from another would cause the tab key to tab into the original popup, regardless of modality. It seems the focus wasn't set right for the second popup window. Here's the fix:

// import mx.managers.*;

// Create the popup window, save a reference to it
popup = PopUpManager.createPopUp( ... );

// Explicity activate the popup to prevent the "2 popup focus issue" behavior
SystemManager.activate( popup );

It's a simple enough solution, but a great little fix. As soon as you open the popup window, have the system manager activate it and you won't have any tab-focus problems on it. File this one away in your Flex bag of tricks as it may just come in handy one day. I think I'm even getting a free beer out of it from Kevin. :-)

And speaking of Kevin, now would be a good time to put a quick plug in for ServiceCapture. If you build RIAs with the Flash platform, this is a great debugging tool to see the traffic being sent between client and server. It can understand AMF data, and give you a human readable view of what is actually being sent. It's helped us on our current Flex project, and will most likely help you on yours as well. ServiceCapture is what the NetConnection Debugger should be...

Comments

  • Public accountability; I guess there is no way I am backing out on that free beer now.

Post a comment

Remember personal info?