[orca] Improve finding sentence start in contents with embedded objects



commit 3a016762450ab396cf2d944aee5b5a120d3a10ca
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jan 3 17:07:28 2019 -0500

    Improve finding sentence start in contents with embedded objects

 src/orca/scripts/web/script_utilities.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 0ae97c81a..e3ec1d387 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1184,8 +1184,12 @@ class Utilities(script_utilities.Utilities):
         # Check for things in the same sentence before this object.
         firstObj, firstStart, firstEnd, firstString = objects[0]
         while firstObj and firstString:
-            if firstStart == 0 and self.isTextBlockElement(firstObj):
-                break
+            if self.isTextBlockElement(firstObj):
+                if firstStart == 0:
+                    break
+            elif self.isTextBlockElement(firstObj.parent):
+                if self.characterOffsetInParent(firstObj) == 0:
+                    break
 
             prevObj, pOffset = self.findPreviousCaretInOrder(firstObj, firstStart)
             onLeft = self._getContentsForObj(prevObj, pOffset, boundary)


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