[orca] Fix for bgo#622821 - Structural navigation should not move to empty sections



commit beea34a4096f85188258af8db58f5ae870dd74f2
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sat Jun 26 14:59:29 2010 -0400

    Fix for bgo#622821 - Structural navigation should not move to empty sections

 .../toolkits/Gecko/structural_navigation.py        |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/structural_navigation.py b/src/orca/scripts/toolkits/Gecko/structural_navigation.py
index 8560650..d84b8c8 100644
--- a/src/orca/scripts/toolkits/Gecko/structural_navigation.py
+++ b/src/orca/scripts/toolkits/Gecko/structural_navigation.py
@@ -112,6 +112,13 @@ class GeckoStructuralNavigation(structural_navigation.StructuralNavigation):
         """
 
         obj, offset = self._script.findFirstCaretContext(obj, 0)
+        if not obj:
+            return obj, offset
+
+        if obj.getRole() == pyatspi.ROLE_SECTION \
+           and not self._script.utilities.queryNonEmptyText(obj):
+            obj, offset = self._script.findNextCaretInOrder(obj, offset)
+
         # If it's an anchor, look for the first object of use.
         # See bug #591592.
         #



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