зеркало из https://github.com/mozilla/pjs.git
Bug 375747. Should not fire nsIAccessible::EVENT_FOCUS for top level window (nsRootAccessible). r=parente
This commit is contained in:
Родитель
858cc7d44d
Коммит
95fe8fe23e
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче