[orca] Prevent extra context being presented in contenteditable elements



commit 93fdfd8e39ec100b0435969648004fe8b8fa2f73
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Feb 12 14:51:07 2019 -0500

    Prevent extra context being presented in contenteditable elements

 src/orca/scripts/web/script.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 69bbdd6ab..af290f4f7 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -840,13 +840,13 @@ class Script(default.Script):
     def sayLine(self, obj):
         """Speaks the line at the current caret position."""
 
-        if not (self._lastCommandWasCaretNav or self._lastCommandWasStructNav) \
-           and not self.utilities.isContentEditableWithEmbeddedObjects(obj):
+        isEditable = self.utilities.isContentEditableWithEmbeddedObjects(obj)
+        if not (self._lastCommandWasCaretNav or self._lastCommandWasStructNav) and not isEditable:
             super().sayLine(obj)
             return
 
         priorObj = None
-        if self._lastCommandWasCaretNav:
+        if self._lastCommandWasCaretNav or isEditable:
             priorObj, priorOffset = self.utilities.getPriorContext()
 
         obj, offset = self.utilities.getCaretContext(documentFrame=None)


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