[orca/gnome-3-16] Don't set the caret position in Gecko zombie replicants

commit bc1084e906e0e50a929eb52f341f42bd3038df23
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Mar 6 20:51:37 2015 -0500

    Don't set the caret position in Gecko zombie replicants
    Gecko seems to like to kill certain accessible objects on us upon focus,
    putting a new one in its place. This would completely mess up Orca's caret
    navigation, so we added checks for these zombies and code to try to find
    their replicants. That way, when the proverbial rug was snatched out from
    under our feet, we could reposition ourselves on the replacement object,
    and everything seemed fine. Now, however, the act of setting the caret in
    the replicant seems to be sufficient to cause Gecko to kill that replicant.
    This is why we can't nice things.
    The change in this commit is to quietly update our locus of focus without
    touching the zombie and its subsequent replicants in the hopes they'll
    leave us alone so that we can actually navigate within the content.

 src/orca/scripts/toolkits/Gecko/script.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 69d0339..ef91ce2 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1152,7 +1152,10 @@ class Script(default.Script):
         if obj and self.utilities.isZombie(obj):
             replicant = self.utilities.findReplicant(event.source, obj)
             if replicant:
-                self.setCaretPosition(replicant, offset)
+                # Refrain from actually touching the replicant by grabbing
+                # focus or setting the caret in it. Doing so will only serve
+                # to anger it.
+                orca.setLocusOfFocus(event, replicant, False)
         if self.handleAsLiveRegion(event):

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]