Commit 0c9663e0 authored by Joanmarie Diggs's avatar Joanmarie Diggs

Don't used cached word contents in editable content

parent 79490ccc
......@@ -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."""
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment