Bug 399128 - Events (still) missing for collapsed XUL combo boxes. r=aaronleventhal aM9=beltzner

This commit is contained in:
Evan.Yan@Sun.COM 2007-10-25 22:30:23 -07:00
parent eb3a474991
commit 68894a7337

View File

@ -847,8 +847,15 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
NS_ENSURE_TRUE(containerAccessible, NS_ERROR_FAILURE);
// It is not top level menuitem
// Only fire focus event if it is not inside collapsed popup
if (State(containerAccessible) & nsIAccessibleStates::STATE_COLLAPSED)
return NS_OK;
// and not a listitem of a combo box
if (State(containerAccessible) & nsIAccessibleStates::STATE_COLLAPSED) {
nsCOMPtr<nsIAccessible> containerParent;
containerAccessible->GetParent(getter_AddRefs(containerParent));
NS_ENSURE_TRUE(containerParent, NS_ERROR_FAILURE);
if (Role(containerParent) != nsIAccessibleRole::ROLE_COMBOBOX) {
return NS_OK;
}
}
}
}
nsAccEvent::PrepareForEvent(aTargetNode, PR_TRUE); // Always asynch, always from user input