Bug 297927. Fix accessible focus events on program launch. r=timeless, sr=tor, a=mkaply
This commit is contained in:
Родитель
a08a20b609
Коммит
751ebae195
|
@ -429,6 +429,7 @@ NS_IMETHODIMP nsDocAccessible::Init()
|
|||
|
||||
if (mRoleMapEntry && mRoleMapEntry->role != ROLE_DIALOG &&
|
||||
mRoleMapEntry->role != ROLE_APPLICATION &&
|
||||
mRoleMapEntry->role != ROLE_ALERT &&
|
||||
mRoleMapEntry->role != ROLE_DOCUMENT) {
|
||||
// Document accessible can only have certain roles
|
||||
// This was set in nsAccessible::Init() based on xhtml2:role attribute
|
||||
|
|
|
@ -587,6 +587,11 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (accessible == this) {
|
||||
// Top level window focus events already automatically fired by MSAA
|
||||
// based on HWND activities. Don't fire the extra focus event.
|
||||
return NS_OK;
|
||||
}
|
||||
FireAccessibleFocusEvent(accessible, targetNode);
|
||||
}
|
||||
else if (eventType.EqualsLiteral("ValueChange")) {
|
||||
|
@ -862,7 +867,7 @@ NS_IMETHODIMP nsRootAccessible::Shutdown()
|
|||
}
|
||||
mCaretAccessible = nsnull;
|
||||
mAccService = nsnull;
|
||||
if (mFireEventTimer) {
|
||||
if (mFireFocusTimer) {
|
||||
mFireFocusTimer->Cancel();
|
||||
mFireFocusTimer = nsnull;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче