      */    
     private function softKeyboardActivateHandler(event:SoftKeyboardEvent):void
     {        
+        // Add a listener for the softKeyboard deactivate event to the event target
+        event.target.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE, 
+                                      softKeyboardDeactivateHandler);
+        
         if (this === FlexGlobals.topLevelApplication)
         {
             // Get the keyboard size

     */ 
    private function softKeyboardDeactivateHandler(event:SoftKeyboardEvent):void
    {
        if (this === FlexGlobals.topLevelApplication)
        {            
            isSoftKeyboardActive = false;

            addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE, 
                softKeyboardActivateHandler, true, 
                EventPriority.DEFAULT, true);
        }
    }

