[orca] Fix presentation of char at end of links in content editable objects
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix presentation of char at end of links in content editable objects
- Date: Sat, 2 Dec 2017 22:26:58 +0000 (UTC)
commit f066ad6e84477d764278a9644df78c4a3f71209e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Dec 2 17:24:50 2017 -0500
Fix presentation of char at end of links in content editable objects
src/orca/scripts/apps/Thunderbird/script.py | 11 -----------
src/orca/scripts/web/script_utilities.py | 7 +++++++
2 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/src/orca/scripts/apps/Thunderbird/script.py b/src/orca/scripts/apps/Thunderbird/script.py
index 978f436..4e46166 100644
--- a/src/orca/scripts/apps/Thunderbird/script.py
+++ b/src/orca/scripts/apps/Thunderbird/script.py
@@ -381,17 +381,6 @@ class Script(Gecko.Script):
debug.println(debug.LEVEL_INFO, msg, True)
self.sayAll(None)
- def sayCharacter(self, obj):
- """Speaks the character at the current caret position."""
-
- if self.utilities.isEditableMessage(obj):
- text = self.utilities.queryNonEmptyText(obj)
- if text and text.caretOffset + 1 >= text.characterCount:
- default.Script.sayCharacter(self, obj)
- return
-
- super().sayCharacter(obj)
-
def sayWord(self, obj):
"""Speaks the word at the current caret position."""
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 516977c..9fd9263 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3527,6 +3527,13 @@ class Utilities(script_utilities.Utilities):
return obj, 0
if offset >= text.characterCount:
+ if self.isLink(obj) and self.isContentEditableWithEmbeddedObjects(obj):
+ nextObj, nextOffset = self.nextContext(obj, text.characterCount)
+ if nextObj:
+ msg = "WEB: First caret context for %s, %i is %s, %i" % (obj, offset, nextObj,
nextOffset)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return nextObj, nextOffset
+
msg = "WEB: First caret context for %s, %i is %s, %i" % (obj, offset, obj, text.characterCount)
debug.println(debug.LEVEL_INFO, msg, True)
return obj, text.characterCount
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]