Bug 399468 - Can open multiple bookmark popups on clicking folders after right-click context menu (check context menu state) [p=enndeakin r+sr=bzbarsky a1.9=beltzner]

This commit is contained in:
reed@reedloden.com 2007-11-09 00:00:23 -08:00
parent 16c8970180
commit 0cdda9d22a

View File

@ -201,8 +201,9 @@ nsXULPopupManager::GetSubmenuWidgetChain(nsISupportsArray **_retval)
// In the case when a menulist inside a panel is open, clicking in the
// panel should still roll up the menu, so if a different type is found,
// stop scanning.
nsMenuChainItem* parent= item->GetParent();
if (parent && item->Frame()->PopupType() != parent->Frame()->PopupType())
nsMenuChainItem* parent = item->GetParent();
if (!parent || item->Frame()->PopupType() != parent->Frame()->PopupType() ||
item->IsContextMenu() != parent->IsContextMenu())
break;
item = parent;
}