[orca] Fix bug causing us to skip over objects in certain grids in browse mode
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix bug causing us to skip over objects in certain grids in browse mode
- Date: Mon, 25 May 2020 19:47:15 +0000 (UTC)
commit dd8e119f37b51761aee7042a1199470e425e19ca
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon May 25 15:41:55 2020 -0400
Fix bug causing us to skip over objects in certain grids in browse mode
We treat ARIA gridcell objects as whole objects rather than text objects.
This, combined with an old workaround for empty text objects, was causing
us to seek the first caret context for a gridcell in the next cell. We're
now handling the empty-text problem as part of _canHaveCaretContext().
Thus this workaround can be removed.
src/orca/scripts/web/script_utilities.py | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 8ebe1cadf..584b8bcbf 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4743,21 +4743,10 @@ class Utilities(script_utilities.Utilities):
return self.findFirstCaretContext(obj[0], 0)
text = self.queryNonEmptyText(obj)
- if not text:
- if self._advanceCaretInEmptyObject(obj) \
- and (self.isTextBlockElement(obj) or self.isEmptyAnchor(obj)):
- nextObj, nextOffset = self.nextContext(obj, offset)
- if nextObj:
- msg = "WEB: First caret context for non-text context %s, %i is next context %s, %i" % \
- (obj, offset, nextObj, nextOffset)
- debug.println(debug.LEVEL_INFO, msg, True)
- return nextObj, nextOffset
-
- if self._canHaveCaretContext(obj):
- msg = "WEB: First caret context for non-text context %s, %i is %s, %i" % \
- (obj, offset, obj, 0)
- debug.println(debug.LEVEL_INFO, msg, True)
- return obj, 0
+ if not text and self._canHaveCaretContext(obj):
+ msg = "WEB: First caret context for non-text context %s, %i is %s, %i" % (obj, offset, obj, 0)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return obj, 0
if text and offset >= text.characterCount:
if self.isContentEditableWithEmbeddedObjects(obj) and self.lastInputEventWasCharNav():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]