         var sm:ISystemManager = systemManager.topLevelSystemManager;
         var screen:Rectangle = sm.getVisibleApplicationRect();
 
+        // pop it up if we haven't already.  this allows us to validate the menu and get correct sizes
+        if (menu.parentDisplayObject && (!menu.parent || !menu.parent.contains(menu.parentDisplayObject)))
+        {
+            PopUpManager.addPopUp(menu, this, false);
+            menu.addEventListener(MenuEvent.MENU_HIDE, menuHideHandler, false, EventPriority.DEFAULT_HANDLER);
+        }
+        
         UIComponentGlobals.layoutManager.validateClient(menu, true);
         
         // popups go on the root of the swf which if loaded, is not

import mx.core.IFactory;
import mx.core.IFlexDisplayObject;
import mx.core.IUIComponent;
import mx.core.mx_internal;
import mx.core.UIComponent;
import mx.core.UIComponentGlobals;
import mx.events.CollectionEvent;
import mx.events.CollectionEventKind;
import mx.events.FlexEvent;
import mx.events.MenuEvent;
import mx.managers.IFocusManagerComponent;
import mx.managers.ISystemManager;
import mx.styles.CSSStyleDeclaration;
import mx.styles.ISimpleStyleClient;
import mx.styles.StyleManager;
import mx.styles.StyleProxy;
import mx.collections.IViewCursor;
import mx.events.InterManagerRequest;

use namespace mx_internal;


{

import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
