Making sure I consume events when the menu bar is active.

git-svn-id: svn://10.0.0.236/trunk@40092 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com
1999-07-19 08:52:42 +00:00
parent 7d39972e33
commit aae1d18e69

View File

@@ -200,6 +200,9 @@ nsMenuBarListener::KeyUp(nsIDOMEvent* aKeyEvent)
mAltKeyDown = PR_FALSE;
mMenuBarFrame->ToggleMenuActiveState();
}
if (mMenuBarFrame->IsActive())
return NS_ERROR_BASE; // I am consuming event
return NS_OK; // means I am NOT consuming event
}
@@ -222,6 +225,9 @@ nsMenuBarListener::KeyDown(nsIDOMEvent* aKeyEvent)
// the menus.
mMenuBarFrame->KeyboardNavigation(theChar);
}
if (mMenuBarFrame->IsActive())
return NS_ERROR_BASE; // I am consuming event
return NS_OK; // means I am NOT consuming event
}
@@ -236,5 +242,8 @@ nsMenuBarListener::KeyPress(nsIDOMEvent* aKeyEvent)
// Test Alt attribute
PRBool isAlt = PR_FALSE;
theEvent->GetAltKey(&isAlt);
if (mMenuBarFrame->IsActive())
return NS_ERROR_BASE; // I am consuming event
return NS_OK; // means I am NOT consuming event
}