[orca] Don't used cached word contents in editable content
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't used cached word contents in editable content
- Date: Mon, 13 Jul 2020 13:42:40 +0000 (UTC)
commit 0c9663e027faeb0a85c290c113387653bd6b26e2
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Jul 13 15:41:08 2020 +0200
Don't used cached word contents in editable content
src/orca/scripts/apps/Thunderbird/script.py | 13 -------------
src/orca/scripts/web/script.py | 6 +++---
2 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/src/orca/scripts/apps/Thunderbird/script.py b/src/orca/scripts/apps/Thunderbird/script.py
index 9da4a188e..ef4494cf8 100644
--- a/src/orca/scripts/apps/Thunderbird/script.py
+++ b/src/orca/scripts/apps/Thunderbird/script.py
@@ -385,19 +385,6 @@ class Script(Gecko.Script):
debug.println(debug.LEVEL_INFO, msg, True)
self.sayAll(None)
- def sayWord(self, obj):
- """Speaks the word at the current caret position."""
-
- contextObj, offset = self.utilities.getCaretContext(documentFrame=None)
- if contextObj != obj:
- super().sayWord(obj)
- return
-
- wordContents = self.utilities.getWordContentsAtOffset(obj, offset)
- textObj, startOffset, endOffset, word = wordContents[0]
- self.speakMisspelledIndicator(textObj, startOffset)
- self.speakContents(wordContents)
-
def toggleFlatReviewMode(self, inputEvent=None):
"""Toggles between flat review mode and focus tracking mode."""
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index ba056851f..e84682347 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -887,8 +887,8 @@ class Script(default.Script):
def sayWord(self, obj):
"""Speaks the word at the current caret position."""
- if not self._lastCommandWasCaretNav \
- and not self.utilities.isContentEditableWithEmbeddedObjects(obj):
+ isEditable = self.utilities.isContentEditableWithEmbeddedObjects(obj)
+ if not self._lastCommandWasCaretNav and not isEditable:
super().sayWord(obj)
return
@@ -897,7 +897,7 @@ class Script(default.Script):
if keyString == "Right":
offset -= 1
- wordContents = self.utilities.getWordContentsAtOffset(obj, offset)
+ wordContents = self.utilities.getWordContentsAtOffset(obj, offset, useCache=not isEditable)
textObj, startOffset, endOffset, word = wordContents[0]
self.speakMisspelledIndicator(textObj, startOffset)
self.speakContents(wordContents)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]