Bug 1187404 - Allow tab to select an option from a select element in e10s r=Enn

This commit is contained in:
George Wright 2015-10-14 13:59:29 -04:00
parent 49300702a2
commit 161721ef9e
3 changed files with 9 additions and 3 deletions

View File

@ -162,6 +162,7 @@
popuponly menulist to be its immediate parent. -->
<menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
<menupopup rolluponmousewheel="true"
activateontab="true"
#ifdef XP_WIN
consumeoutsideclicks="false" ignorekeys="handled"
#endif

View File

@ -67,6 +67,7 @@ GK_ATOM(acronym, "acronym")
GK_ATOM(action, "action")
GK_ATOM(active, "active")
GK_ATOM(activetitlebarcolor, "activetitlebarcolor")
GK_ATOM(activateontab, "activateontab")
GK_ATOM(actuate, "actuate")
GK_ATOM(address, "address")
GK_ATOM(after, "after")

View File

@ -2252,13 +2252,17 @@ nsXULPopupManager::HandleKeyboardEventWithKeyCode(
#ifndef XP_MACOSX
case nsIDOMKeyEvent::DOM_VK_F10:
#endif
// close popups or deactivate menubar when Tab or F10 are pressed
if (aTopVisibleMenuItem) {
if (aTopVisibleMenuItem &&
!aTopVisibleMenuItem->Frame()->GetContent()->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::activateontab, nsGkAtoms::_true, eCaseMatters)) {
// close popups or deactivate menubar when Tab or F10 are pressed
Rollup(0, false, nullptr, nullptr);
break;
} else if (mActiveMenuBar) {
mActiveMenuBar->MenuClosed();
break;
}
break;
// Intentional fall-through to RETURN case
case nsIDOMKeyEvent::DOM_VK_RETURN: {
// If there is a popup open, check if the current item needs to be opened.