Bug 1192655 - Make menubar not react to events when it is not visible. r=enn

This commit is contained in:
Xidorn Quan 2015-08-29 11:12:41 +10:00
parent 16ed7702fd
commit 1bd2ca2c38

View File

@ -408,6 +408,11 @@ nsMenuBarListener::MouseDown(nsIDOMEvent* aMouseEvent)
nsresult
nsMenuBarListener::HandleEvent(nsIDOMEvent* aEvent)
{
// If the menu bar is collapsed, don't do anything.
if (!mMenuBarFrame->StyleVisibility()->IsVisible()) {
return NS_OK;
}
nsAutoString eventType;
aEvent->GetType(eventType);