Bug 1252857 - Value change events for HTML:select have wrong target. r=marcoz, a=ritu

This commit is contained in:
Alexander Surkov 2016-03-18 16:22:17 -04:00
parent fb146a9a7c
commit c4760e4a35
2 changed files with 8 additions and 7 deletions

View File

@ -1247,12 +1247,6 @@ DocAccessible::GetAccessibleOrContainer(nsINode* aNode) const
if (!(currNode = parent)) break;
}
// HTML comboboxes have no-content list accessible as an intermediate
// containing all options.
if (accessible && accessible->IsHTMLCombobox()) {
return accessible->FirstChild();
}
return accessible;
}
@ -1701,6 +1695,12 @@ DocAccessible::ProcessContentInserted(Accessible* aContainer,
// there is no HTML body element.
}
// HTML comboboxes have no-content list accessible as an intermediate
// containing all options.
if (container && container->IsHTMLCombobox()) {
container = container->FirstChild();
}
// We have a DOM/layout change under the container accessible, and its tree
// might need an update. Since DOM/layout change of the element may affect
// on the accessibleness of adjacent elements (for example, insertion of

View File

@ -132,7 +132,8 @@
function changeSelectValue(aID, aKey, aValue)
{
this.eventSeq = [new invokerChecker(EVENT_TEXT_VALUE_CHANGE, aID)];
this.eventSeq =
[ new invokerChecker(EVENT_TEXT_VALUE_CHANGE, getAccessible(aID)) ];
this.invoke = function changeSelectValue_invoke()
{