             }   
             else
             {          
-                parentWidth = o.parent.width;
-                parentHeight = o.parent.height;
+                parentWidth = popUpParent.width;
+                parentHeight = popUpParent.height;
             }
 
             // The appWidth may smaller than parentWidth if the application is

            y = Math.max(0, (Math.min(appHeight, parentHeight) - popUp.height) / 2);
            
            pt = new Point(clippingOffset.x, clippingOffset.y);
            pt = o.parent.localToGlobal(pt);
            pt = popUp.parent.globalToLocal(pt);
            popUp.move(Math.round(x) + pt.x, Math.round(y) + pt.y);
        }

            IInvalidating(popUp).validateNow();

        const o:PopUpData = findPopupInfoByOwner(popUp);
        
        // If we don't find the pop owner or if the owner's parent is not specified or is not on the
        // stage, then center based on the popUp's current parent.
        var popUpParent:DisplayObject = (o && o.parent && o.parent.stage) ? o.parent : popUp.parent;
        if (popUpParent)
        {
            var systemManager:ISystemManager = o.systemManager;
            var x:Number;
