[orca] Web: Fix bug in toolbar browse-mode navigation



commit c490965a412a6bb91c79fa0af9dce70bcde96528
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Jun 28 15:13:26 2021 +0200

    Web: Fix bug in toolbar browse-mode navigation
    
    If we're in a toolbar which is descendable (e.g. because we're in browse
    mode), the line contents should be for the descendants and not include
    the toolbar itself.
    
    Including it as part of the contents can lead to our getting stuck when
    we try to navigate past it due to a to-be-debugged issue. However, since
    the toolbar itself shouldn't be on the line anyway, remove it.

 src/orca/scripts/web/script_utilities.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index a60d98896..eda52d149 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1734,8 +1734,12 @@ class Utilities(script_utilities.Utilities):
             debug.println(debug.LEVEL_INFO, msg, True)
             return []
 
-        text = self.queryNonEmptyText(obj)
         offset = max(0, offset)
+        if obj.getRole() == pyatspi.ROLE_TOOL_BAR and not self._treatObjectAsWhole(obj):
+            child = self.getChildAtOffset(obj, offset)
+            if child:
+                obj = child
+                offset = 0
 
         if useCache:
             if self.findObjectInContents(obj, offset, self._currentLineContents, usingCache=True) != -1:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]