mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 389112, pressing tab or escape doesn't deactivate menubar, r+sr=neil,a=dbaron
This commit is contained in:
parent
c655665c6a
commit
841bf02591
@ -1626,13 +1626,21 @@ nsXULPopupManager::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
HandleKeyboardNavigation(theChar);
|
||||
}
|
||||
else if (theChar == NS_VK_ESCAPE) {
|
||||
// Pressing Escape hides one level of menus only
|
||||
// Pressing Escape hides one level of menus only. If no menu is open,
|
||||
// check if a menubar is active and inform it that a menu closed. Even
|
||||
// though in this latter case, a menu didn't actually close, the effect
|
||||
// ends up being the same. Similar for the tab key below.
|
||||
nsMenuChainItem* item = GetTopVisibleMenu();
|
||||
if (item)
|
||||
HidePopup(item->Content(), PR_FALSE, PR_FALSE, PR_FALSE);
|
||||
else if (mActiveMenuBar)
|
||||
mActiveMenuBar->MenuClosed();
|
||||
}
|
||||
else if (theChar == NS_VK_TAB) {
|
||||
Rollup();
|
||||
if (mCurrentMenu)
|
||||
Rollup();
|
||||
else if (mActiveMenuBar)
|
||||
mActiveMenuBar->MenuClosed();
|
||||
}
|
||||
else if (theChar == NS_VK_ENTER ||
|
||||
theChar == NS_VK_RETURN) {
|
||||
|
Loading…
Reference in New Issue
Block a user