[orca] Set the caret position before speaking the character at that position



commit 2032124b83e7b41810f86f1491f5f59d5a5b3856
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun Sep 14 20:54:39 2014 -0400

    Set the caret position before speaking the character at that position
    
    Otherwise the locusOfFocus might not be this object

 src/orca/scripts/toolkits/Gecko/script.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 642f1c1..896b413 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -2658,10 +2658,9 @@ class Script(default.Script):
 
         if not obj:
             [obj, characterOffset] = self.getBottomOfFile()
-        else:
-            self.speakCharacterAtOffset(obj, characterOffset)
 
         self.setCaretPosition(obj, characterOffset)
+        self.speakCharacterAtOffset(obj, characterOffset)
         self.updateBraille(obj)
 
     def goPreviousCharacter(self, inputEvent):
@@ -2677,10 +2676,9 @@ class Script(default.Script):
 
         if not obj:
             [obj, characterOffset] = self.getTopOfFile()
-        else:
-            self.speakCharacterAtOffset(obj, characterOffset)
 
         self.setCaretPosition(obj, characterOffset)
+        self.speakCharacterAtOffset(obj, characterOffset)
         self.updateBraille(obj)
 
     def goPreviousWord(self, inputEvent):


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