Reorder popup handling to reflect view hierarchy of menus