[orca] Don't look to the next element when line nav moves us to the end
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't look to the next element when line nav moves us to the end
- Date: Tue, 3 Mar 2020 14:56:35 +0000 (UTC)
commit a6723c48fa4abcbecfb236cda05b4084a22defc4
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Mar 3 15:52:26 2020 +0100
Don't look to the next element when line nav moves us to the end
When navigating in contenteditable content, moving just past a child
element can result in our getting a caret-moved event for the end of that
child, but not one for what is functionally the new caret position. Our
handling for this situation is producing incorrect results when we have
wound up at the end of an element as a consequence of line navigation.
Therefore don't adjust the offset when navigating by line.
src/orca/scripts/web/script_utilities.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index e4cd407e0..066d95a90 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4523,7 +4523,7 @@ class Utilities(script_utilities.Utilities):
return obj, 0
if text and offset >= text.characterCount:
- if self.isContentEditableWithEmbeddedObjects(obj):
+ if self.isContentEditableWithEmbeddedObjects(obj) and not self.lastInputEventWasLineNav():
nextObj, nextOffset = self.nextContext(obj, text.characterCount)
if nextObj:
msg = "WEB: First caret context at end of %s, %i is next context %s, %i" % \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]