Bug 615220 - Don't fire focus event for current focused accessible when document gets focus, r=davidb, a=davidb
authorAlexander Surkov <surkov.alexander@gmail.com>
Thu, 02 Dec 2010 16:47:20 +0800
changeset 58457 dfedd535f514dc0ec600e0e24ea358126a74b090
parent 58456 2adf67fdc19ad2116f253bf2e8d5d592a2fc87ce
child 58458 06d98df8a568b6c186be54ff6cf53c0ab0f8c3b1
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdavidb, davidb
bugs615220
milestone2.0b8pre
Bug 615220 - Don't fire focus event for current focused accessible when document gets focus, r=davidb, a=davidb
accessible/src/base/nsRootAccessible.cpp
--- a/accessible/src/base/nsRootAccessible.cpp
+++ b/accessible/src/base/nsRootAccessible.cpp
@@ -616,23 +616,16 @@ nsRootAccessible::HandleEvent(nsIDOMEven
       nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_SELECTION,
                               treeItemAccessible);
       return NS_OK;
     }
   }
   else
 #endif
   if (eventType.EqualsLiteral("focus")) {
-    if (targetNode == mDocument && mDocument != gLastFocusedNode) {
-      // Got focus event for the window, we will make sure that an accessible
-      // focus event for initial focus is fired. We do this on a short timer
-      // because the initial focus may not have been set yet.
-      NS_DISPATCH_RUNNABLEMETHOD(FireCurrentFocusEvent, this)
-    }
-
     // Keep a reference to the target node. We might want to change
     // it to the individual radio button or selected item, and send
     // the focus event to that.
     nsCOMPtr<nsINode> focusedItem = targetNode;
     if (!treeItemAccessible) {
       nsCOMPtr<nsIDOMXULSelectControlElement> selectControl =
         do_QueryInterface(targetNode);
       if (selectControl) {