Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 4.1 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
This issue is very closely related to bug# SDK-24015. But instead of erroring on removeFocusListeners, it now errors on addFocusListeners. I monkey patched my distribution to include the same fix as the removeFocusListeners one which basically means wrapping the two statements that are in the try block inside of an if(stage). Below is a suggested fix for the issue.
private function addFocusEventListeners():void
{
// If we get a security error because we're not allowed to add event listeners to the stage,
// then just add them to the systemManager instead because we could be an untrusted app.
try
{
if (stage)
}
catch (err:SecurityError)
focusListenersAdded = true;
}
Steps to reproduce:
1.I have an app that has a UIMovieClip asset on the screen which has focus. I switch to another program, and switch back at which point I get the error.
Actual Results:
Error: because stage is null.
Expected Results:
no error.
Workaround (if any):
see proposed fix above.