Bug 375747. Should not fire nsIAccessible::EVENT_FOCUS for top level window (nsRootAccessible). r=parente

This commit is contained in:
aaronleventhal@moonset.net 2007-04-10 11:41:40 -07:00
Родитель 858cc7d44d
Коммит 95fe8fe23e
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -506,9 +506,10 @@ PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
if (docAccessible) {
// Doc is gaining focus, but actual focus may be on an element within document
nsCOMPtr<nsIDOMNode> realFocusedNode = GetCurrentFocus();
if (realFocusedNode != aNode) {
if (realFocusedNode != aNode || realFocusedNode == mDOMNode) {
// Suppress document focus, because real DOM focus will be fired next,
// and that's what we care about
// Make sure we never fire focus for the nsRootAccessible (mDOMNode)
return PR_FALSE;
}
}