зеркало из https://github.com/mozilla/gecko-dev.git
Adding the ability for popups to not install the keyboard navigation listener. Needed for autocomplete. R=hyatt
This commit is contained in:
Родитель
fa49948d4f
Коммит
7c3c972751
|
@ -85,6 +85,7 @@ XUL_ATOM(popup, "popup") // The popup for a context menu, popup menu, or tooltip
|
|||
XUL_ATOM(menugenerated, "menugenerated") // Internal
|
||||
XUL_ATOM(popupanchor, "popupanchor") // Anchor for popups
|
||||
XUL_ATOM(popupalign, "popupalign") // Alignment for popups
|
||||
XUL_ATOM(ignorekeys, "ignorekeys") // Alignment for popups
|
||||
|
||||
XUL_ATOM(key, "key") // A key element
|
||||
XUL_ATOM(broadcaster, "broadcaster") // A broadcaster
|
||||
|
|
|
@ -551,8 +551,18 @@ nsPopupSetFrame::OpenPopup(PRBool aActivateFlag)
|
|||
nsIFrame* activeChild = GetActiveChild();
|
||||
nsCOMPtr<nsIMenuParent> childPopup = do_QueryInterface(activeChild);
|
||||
UpdateDismissalListener(childPopup);
|
||||
|
||||
// First check and make sure this popup wants keyboard navigation
|
||||
|
||||
// popupsetframe::mElementFrame
|
||||
nsCOMPtr<nsIContent> content;
|
||||
mElementFrame->GetContent(getter_AddRefs(content));
|
||||
nsAutoString property;
|
||||
content->GetAttribute(kNameSpaceID_None, nsXULAtoms::ignorekeys, property);
|
||||
if (! property.EqualsWithConversion("true")) {
|
||||
childPopup->InstallKeyboardNavigator();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!OnDestroy())
|
||||
return;
|
||||
|
|
|
@ -85,6 +85,7 @@ XUL_ATOM(popup, "popup") // The popup for a context menu, popup menu, or tooltip
|
|||
XUL_ATOM(menugenerated, "menugenerated") // Internal
|
||||
XUL_ATOM(popupanchor, "popupanchor") // Anchor for popups
|
||||
XUL_ATOM(popupalign, "popupalign") // Alignment for popups
|
||||
XUL_ATOM(ignorekeys, "ignorekeys") // Alignment for popups
|
||||
|
||||
XUL_ATOM(key, "key") // A key element
|
||||
XUL_ATOM(broadcaster, "broadcaster") // A broadcaster
|
||||
|
|
Загрузка…
Ссылка в новой задаче