Shortcut keys should open submenus (regression from bug 279703) r=Enn

This commit is contained in:
neil@parkwaycc.co.uk 2007-07-07 01:40:54 -07:00
parent 8809a660e2
commit 78b14b30c1

View File

@ -1052,8 +1052,13 @@ nsXULPopupManager::HandleShortcutNavigation(nsIDOMKeyEvent* aKeyEvent)
nsMenuFrame* result = currentPopup->FindMenuWithShortcut(aKeyEvent, action);
if (result) {
currentPopup->ChangeMenuItem(result, PR_FALSE);
if (action)
result->Enter();
if (action) {
nsMenuFrame* menuToOpen = result->Enter();
if (menuToOpen) {
nsCOMPtr<nsIContent> content = menuToOpen->GetContent();
ShowMenu(content, PR_TRUE, PR_FALSE);
}
}
return PR_TRUE;
}