diff --git a/layout/xul/base/src/nsMenuFrame.cpp b/layout/xul/base/src/nsMenuFrame.cpp index 5523bb97fa2..15e79317d34 100644 --- a/layout/xul/base/src/nsMenuFrame.cpp +++ b/layout/xul/base/src/nsMenuFrame.cpp @@ -492,8 +492,9 @@ nsMenuFrame::HandleEvent(nsPresContext* aPresContext, if (IsMenu() && !onmenubar && IsOpen()) { // Submenus don't get closed up immediately. } - else + else if (this == mMenuParent->GetCurrentMenuItem()) { mMenuParent->ChangeMenuItem(nsnull, PR_FALSE); + } } } }