зеркало из https://github.com/mozilla/pjs.git
Making sure I consume events when the menu bar is active.
This commit is contained in:
Родитель
3bba4d1d06
Коммит
b66bc8ab1c
|
@ -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
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче