Copy link to clipboard
Copied
Here is the full error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at spark.components::Application/softKeyboardDeactivateHandler()
It then takes me to the Application.xml class file. I have no idea what's wrong but it seems to only happen during debug mode. The only results I got on google where in Chinese. Anyone know what's wrong?
Copy link to clipboard
Copied
It takes me to the following function:
private function softKeyboardDeactivateHandler(event:SoftKeyboardEvent):void
{
if (this === FlexGlobals.topLevelApplication)
{
isSoftKeyboardActive = false;
if (softKeyboardBehavior == "none" && resizeForSoftKeyboard)
{
var sm:SystemManager = systemManager as SystemManager;
var scaleFactor:Number = 1;
// Account for any density scaling
if (sm)
scaleFactor = sm.densityScale;
// Restore the original values
setActualSize(stage.stageWidth / scaleFactor, stage.stageHeight / scaleFactor);
validateNow(); // Validate so that other listeners like Scroller get the updated dimensions
}
}
}
I really have no control over this code so it's pretty messed up.
Copy link to clipboard
Copied
Setting resizeForSoftKeyboard="false" in the main mxml file fixed the issue