[orca] Fix an issue with structural navigation into list boxes



commit 77417acfb8cdf8e2f5ab526bb674f9acd7a0cdaf
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun Aug 24 23:43:48 2014 -0400

    Fix an issue with structural navigation into list boxes

 src/orca/scripts/toolkits/Gecko/script.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index d2ac939..5fd6e0f 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1205,10 +1205,6 @@ class Script(default.Script):
             orca.setLocusOfFocus(event, event.source)
             return
 
-        if obj.parent.getRole() == pyatspi.ROLE_LIST_BOX \
-           and not self._useFocusMode(obj):
-            return
-
         # As the caret moves into a non-focusable element, Gecko emits the
         # signal on the first focusable element in the ancestry.
         rolesToIgnore = pyatspi.ROLE_DOCUMENT_FRAME, pyatspi.ROLE_PANEL
@@ -1227,6 +1223,13 @@ class Script(default.Script):
             debug.println(debug.LEVEL_INFO, msg)
             return
 
+        if self._lastCommandWasStructNav:
+            msg = "INFO: Focus change event handled manually: last command was struct nav"
+            debug.println(debug.LEVEL_INFO, msg)
+            self.setCaretContext(event.source, -1)
+            orca.setLocusOfFocus(event, event.source)
+            return
+
         default.Script.onFocusedChanged(self, event)
 
     def onShowingChanged(self, event):


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