mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 375747. Should not fire nsIAccessible::EVENT_FOCUS for top level window (nsRootAccessible). r=parente
This commit is contained in:
parent
6ab774da75
commit
97a4bbcebe
@ -506,9 +506,10 @@ PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
|
|||||||
if (docAccessible) {
|
if (docAccessible) {
|
||||||
// Doc is gaining focus, but actual focus may be on an element within document
|
// Doc is gaining focus, but actual focus may be on an element within document
|
||||||
nsCOMPtr<nsIDOMNode> realFocusedNode = GetCurrentFocus();
|
nsCOMPtr<nsIDOMNode> realFocusedNode = GetCurrentFocus();
|
||||||
if (realFocusedNode != aNode) {
|
if (realFocusedNode != aNode || realFocusedNode == mDOMNode) {
|
||||||
// Suppress document focus, because real DOM focus will be fired next,
|
// Suppress document focus, because real DOM focus will be fired next,
|
||||||
// and that's what we care about
|
// and that's what we care about
|
||||||
|
// Make sure we never fire focus for the nsRootAccessible (mDOMNode)
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user