[orca/gnome-3-20] Don't set new focus to context object if context object is zombie



commit ba496e60c3263effa083d7239a08b919da16b656
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Apr 11 17:07:10 2016 -0400

    Don't set new focus to context object if context object is zombie

 src/orca/scripts/web/script.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 6433909..5b064fa 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1007,7 +1007,9 @@ class Script(default.Script):
 
         caretOffset = 0
         if not oldFocus or self.utilities.inFindToolbar(oldFocus):
-            newFocus, caretOffset = self.utilities.getCaretContext()
+            contextObj, contextOffset = self.utilities.getCaretContext()
+            if contextObj and not self.utilities.isZombie(contextObj):
+                newFocus, caretOffset = contextObj, contextOffset
 
         if newFocus.getRole() == pyatspi.ROLE_UNKNOWN:
             msg = "WEB: Event source has bogus role. Likely browser bug."


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