Bug 394547. Giving focus to a tree in an autocomplete causes absence of future caret-moved events for the entry. r=evan.yan, a=dsicore

This commit is contained in:
aaronleventhal@moonset.net 2007-09-18 15:44:41 -07:00
Родитель 9d4bd1299a
Коммит 444546f70f
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -442,6 +442,12 @@ PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
nsCOMPtr<nsIDOMEventTarget> domEventTarget;
nsevent->GetOriginalTarget(getter_AddRefs(domEventTarget));
nsCOMPtr<nsIDOMNode> realFocusedNode(do_QueryInterface(domEventTarget));
if (!realFocusedNode) {
// When FireCurrentFocusEvent() synthesizes a focus event,
// the orignal target does not exist, so use the passed-in node
// which is the relevant focused node
realFocusedNode = aNode;
}
if (realFocusedNode) {
mCaretAccessible->SetControlSelectionListener(realFocusedNode);
}