From 56029994cf7611b4aefd9a9d1cb55df63527d469 Mon Sep 17 00:00:00 2001 From: "jay.yan%sun.com" Date: Tue, 3 Sep 2002 02:26:01 +0000 Subject: [PATCH] bug 164796 disable menu should not be opened. patch=robin.lu@sun.com, r=jay.yan@sun.com, sr=hyatt --- layout/xul/base/src/nsMenuBarFrame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layout/xul/base/src/nsMenuBarFrame.cpp b/layout/xul/base/src/nsMenuBarFrame.cpp index 24fc3efa82d..4f8ad9a50e5 100644 --- a/layout/xul/base/src/nsMenuBarFrame.cpp +++ b/layout/xul/base/src/nsMenuBarFrame.cpp @@ -579,7 +579,9 @@ NS_IMETHODIMP nsMenuBarFrame::SetCurrentMenuItem(nsIMenuFrame* aMenuItem) aMenuItem->SelectMenu(PR_TRUE); aMenuItem->MarkAsGenerated(); // Have the menu building. Get it ready to be shown. - if (wasOpen) + PRBool isDisabled = PR_FALSE; + aMenuItem->MenuIsDisabled(isDisabled); + if (wasOpen&&!isDisabled) aMenuItem->OpenMenu(PR_TRUE); }