[orca] Work around comboboxes failing to implement the selection interface



commit 275f784e70d81686712c89fd2ea79637fcb228ec
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jun 14 21:21:56 2019 -0400

    Work around comboboxes failing to implement the selection interface

 src/orca/script_utilities.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 556ae6626..0a124e228 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -4468,6 +4468,11 @@ class Utilities:
             selected = self.selectedChildren(obj)
             if selected:
                 obj = selected[0]
+            else:
+                isMenu = lambda x: x and x.getRole() == pyatspi.ROLE_MENU
+                selected = self.selectedChildren(pyatspi.findDescendant(obj, isMenu))
+                if selected:
+                    obj = selected[0]
 
         parent = self.getFunctionalParent(obj)
         childCount = self.getFunctionalChildCount(parent)


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