[orca] Do not relocate the caret when focus mode is sticky



commit cbc383817063644b81c53d7a47c70d979fa27afb
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Aug 13 19:59:51 2014 -0400

    Do not relocate the caret when focus mode is sticky

 src/orca/scripts/toolkits/Gecko/script.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 00aec33..6da0fcd 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1323,6 +1323,9 @@ class Script(default.Script):
         self.setCaretContext(newFocus, caretOffset)
         default.Script.locusOfFocusChanged(self, event, oldFocus, newFocus)
 
+        if self._focusModeIsSticky:
+            return
+
         if self._useFocusMode(newFocus) != self._inFocusMode:
             self.togglePresentationMode(None)
 
@@ -3293,6 +3296,8 @@ class Script(default.Script):
             self.toggleFlatReviewMode()
 
         self.setCaretContext(obj, characterOffset)
+        if self._focusModeIsSticky:
+            return
 
         try:
             state = obj.getState()
@@ -3302,13 +3307,14 @@ class Script(default.Script):
         orca.setLocusOfFocus(None, obj, notifyScript=False)
         if state.contains(pyatspi.STATE_FOCUSABLE):
             obj.queryComponent().grabFocus()
-            if self._useFocusMode(obj) != self._inFocusMode:
-                self.togglePresentationMode(None)
 
         text = self.utilities.queryNonEmptyText(obj)
         if text:
             text.setCaretOffset(characterOffset)
 
+        if self._useFocusMode(obj) != self._inFocusMode:
+            self.togglePresentationMode(None)
+
     def moveToMouseOver(self, inputEvent):
         """Positions the caret offset to the next character or object
         in the mouse over which has just appeared.


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