     /**
      *  @private
      */
+    private function childHideHandler(event:Event):void
+    {
+        var target:DisplayObject = DisplayObject(event.target);
+        // trace("FocusManager focusInHandler in  = " + this._form.systemManager.loaderInfo.url);
+        // trace("FM " + this + " focusInHandler " + target);
+
+        if (lastFocus && !isEnabledAndVisible(DisplayObject(lastFocus)))
+        {
+            DisplayObject(form).stage.focus = null;
+            lastFocus = null;
+        }
+    }
+
+    /**
+     *  @private
+     */
     private function creationCompleteHandler(event:FlexEvent):void
     {
         var o:DisplayObject = DisplayObject(form);

            // trace("tabHandled by " + this);
            setFocusToNextObject(event);

			if (focusChanged)
            	event.preventDefault();
        }
    }

        container.addEventListener(Event.REMOVED, removedHandler);
        container.addEventListener(FlexEvent.SHOW, showHandler);
        container.addEventListener(FlexEvent.HIDE, hideHandler);
        container.addEventListener(FlexEvent.HIDE, childHideHandler, true);
        
        //special case application and window
        if (container.systemManager is SystemManager)
