             var appHeight:Number = (stage.stageHeight - keyboardRect.height) / scaleFactor;
             
             if (appHeight != height)
-            {                
+            {
                 setActualSize(width, appHeight);
                 validateNow(); // Validate so that other listeners like Scroller get the updated dimensions
             }

                if (resizeForSoftKeyboard && !softKeyboardHandlersAdded)
                {
                    // Use a high priority so that the application resize will occur first
                    systemManager.stage.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE, 
                                                         softKeyboardActivateHandler, false, 
                                                         EventPriority.BINDING, true);
                    systemManager.stage.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE, 
                                                         softKeyboardDeactivateHandler, false, 
                                                         EventPriority.BINDING, true);
                    softKeyboardHandlersAdded = true;
                }
                else if (!resizeForSoftKeyboard && softKeyboardHandlersAdded)
                {
                    systemManager.stage.removeEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE, softKeyboardActivateHandler, false);
                    systemManager.stage.removeEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE, softKeyboardDeactivateHandler, false);
                    softKeyboardHandlersAdded = false;
                }
            }

        {
            // Get the keyboard size
            var keyboardRect:Rectangle = stage.softKeyboardRect;
            
            var sm:SystemManager = systemManager as SystemManager;
            var scaleFactor:Number = 1;
            
