[orca] Ensure we present caret moved events for editable content in focus mode



commit f2f5093b5bebe4e485f2dcf9890d70a5320f5604
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Aug 9 14:22:22 2014 -0400

    Ensure we present caret moved events for editable content in focus mode

 src/orca/scripts/toolkits/Gecko/script.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 7c3e1f6..1217f4a 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -836,11 +836,14 @@ class Script(default.Script):
             return
 
         obj = event.source
+        state = obj.getState()
+
         firstObj, firstOffset = self.findFirstCaretContext(obj, event.detail1)
         if firstOffset == contextOffset and firstObj == contextObj:
             return
 
-        if contextObj and contextObj.parent == firstObj:
+        if contextObj and contextObj.parent == firstObj \
+           and not state.contains(pyatspi.STATE_EDITABLE):
             return
 
         if not self.inDocumentContent(obj):
@@ -854,7 +857,7 @@ class Script(default.Script):
         self.setCaretContext(obj, event.detail1)
         if not _settingsManager.getSetting('caretNavigationEnabled') \
            or self._inFocusMode \
-           or obj.getState().contains(pyatspi.STATE_EDITABLE):
+           or state.contains(pyatspi.STATE_EDITABLE):
             orca.setLocusOfFocus(event, obj, False)
 
         default.Script.onCaretMoved(self, event)


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