Index: src/orca/Gecko.py
===================================================================
--- src/orca/Gecko.py	(revision 2345)
+++ src/orca/Gecko.py	(working copy)
@@ -1775,7 +1775,7 @@
         label = _("Use _Orca Caret Navigation")
         self.controlCaretNavigationCheckButton = gtk.CheckButton(label)
         gtk.Widget.show(self.controlCaretNavigationCheckButton)
-        gtk.Box.pack_start(generalVBox, self.controlCaretNavigationCheckButton, 
+        gtk.Box.pack_start(generalVBox, self.controlCaretNavigationCheckButton,
                            False, False, 0)
         gtk.ToggleButton.set_active(self.controlCaretNavigationCheckButton,
                                     controlCaretNavigation)
@@ -1835,7 +1835,7 @@
         label = _("Announce cell _header")
         self.speakCellHeadersCheckButton = gtk.CheckButton(label)
         gtk.Widget.show(self.speakCellHeadersCheckButton)
-        gtk.Box.pack_start(tableVBox, self.speakCellHeadersCheckButton, 
+        gtk.Box.pack_start(tableVBox, self.speakCellHeadersCheckButton,
                            False, False, 0)
         gtk.ToggleButton.set_active(self.speakCellHeadersCheckButton,
                                     speakCellHeaders)
@@ -2245,6 +2245,16 @@
            or (not len(event.source.role)):
             return
 
+        # We'll also ignore focus events on objects of role "unknown".
+        # This seems to be an indicator that Gecko has decided to
+        # discard an object on us.  See:
+        #
+        # http://bugzilla.gnome.org/show_bug.cgi?id=412677
+        # https://bugzilla.mozilla.org/show_bug.cgi?id=371955
+        #
+        if event.source.role == rolenames.ROLE_UNKNOWN:
+            return
+
         # We also ignore focus events on the panel that holds the document
         # frame.  We end up getting these typically because we've called
         # grabFocus on this panel when we're doing caret navigation.  In
@@ -2331,7 +2341,7 @@
         # the image focus and announce it.
         #
         if event.source.role == rolenames.ROLE_LINK:
-            containingLink = self.getContainingRole(orca_state.locusOfFocus, 
+            containingLink = self.getContainingRole(orca_state.locusOfFocus,
                                                     rolenames.ROLE_LINK)
             if containingLink == event.source:
                 return
@@ -4483,7 +4493,7 @@
 
         self.caretContext = [obj, characterOffset]
 
-        # If we're not in a table cell, reset self.lastTableCell. 
+        # If we're not in a table cell, reset self.lastTableCell.
         #
         if obj.role != rolenames.ROLE_TABLE_CELL:
             cell = self.getContainingRole(obj, rolenames.ROLE_TABLE_CELL)
@@ -4826,7 +4836,7 @@
                                                         previousCharOffset))
         # Debug...
         #
-        #contents = self.getLineContentsAtOffset(previousObj, 
+        #contents = self.getLineContentsAtOffset(previousObj,
         #                                        previousCharOffset)
         #self.dumpContents(inputEvent, contents)
 
@@ -5243,7 +5253,7 @@
                                     rolenames.ROLE_RADIO_BUTTON]:
                 # [[[TODO: HACK - JD.  Explicit focus-grabbing doesn't
                 # work on all objects.  But form fields by their very
-                # nature have text around them.  Therefore, let's try 
+                # nature have text around them.  Therefore, let's try
                 # quietly updating our caretContext to the text that's
                 # just before the form field we care about before setting
                 # the caret position to that form field.]]]
@@ -5321,7 +5331,7 @@
                                     rolenames.ROLE_RADIO_BUTTON]:
                 # [[[TODO: HACK - JD.  Explicit focus-grabbing doesn't
                 # work on all objects.  But form fields by their very
-                # nature have text around them.  Therefore, let's try 
+                # nature have text around them.  Therefore, let's try
                 # quietly updating our caretContext to the text that's
                 # just after the form field we care about before setting
                 # the caret position to that form field.]]]
