         // if we've poped out of the boundaries, just snap it to the lower right corner, or upper
         // if upping, left if lefting
         if (submenu.x < fitting.left) {
-            submenu.x = lefting ? 0 : Math.max(
+            submenu.x = lefting ? fitting.left : Math.max(
                     fitting.right - submenu.getExplicitOrMeasuredWidth(), fitting.left);
         }
         if (submenu.y < fitting.top) {
-            submenu.y = upping ? 0 : Math.max(
+            submenu.y = upping ? fitting.top : Math.max(
                     fitting.bottom - submenu.getExplicitOrMeasuredHeight(), fitting.top);
         }
     }

    protected var _dispatcher :IEventDispatcher;
    protected var _lefting :Boolean = false;
    protected var _upping :Boolean = false;
}
}

        var submenu :Menu = IMenuItemRenderer(row).menu;
        var lefting :Boolean = _lefting;
        var upping :Boolean = _upping;
        var fitting :Rectangle = _fitting != null ? _fitting :
            new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
        if (submenu.x + submenu.getExplicitOrMeasuredWidth() > fitting.right) {
            lefting = true;
        }
