I have an Flex Application (Flex 3.5, Flashplayer 10).
When I activate an Application on my PC and then go back to the browser, the last focused Component gets the focus back in Firefox. When I use the IE 8 Browser, this doesn't work.
After some studies i found the property browserMode in the FocusManager, which is initalized like that:
browserMode = Capabilities.playerType == "ActiveX" && !popup;
With IE, this property gets true.
Now there is also the Focus activate Handler Method:
private function activateHandler(event:Event):void
// var target:InteractiveObject = InteractiveObject(event.target);
// trace("FM " + this + " activateHandler ", _lastFocus);
// restore focus if this focus manager had last focus
if (_lastFocus && !browserMode)
lastAction = "ACTIVATE";
So, its clear, why it won't work in IE. But I don't see the reason, why Adobe denied the FocusEvent in IE.
And my second question: How can I solve it? I created a custom FocusManager and assigned it to the Application, but that don't work. It seems, there is another FocusManager instance responsible for that.
Thanks in advance!
It is because IE supports tabbing out of the app to the browser and back in
again. IE6 and 7 used to always activate the addressbar in the browser and
re-activation. If IE8 is now re-activating the SWF we should probably
change that logic.
Try turning off browserMode in your app like this:
applicationComplete="FocusManager(focusManager).browserMode = false"
You may need to import mx.managers.FocusManager;
Thanks for solution (yes, it works) and the explanation!