[orca] Exclude static-text leaf nodes when checking for and caching selected text
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Exclude static-text leaf nodes when checking for and caching selected text
- Date: Tue, 23 Apr 2019 07:24:33 +0000 (UTC)
commit 27ccb1100a483e01a238e5cbc2dd5be66989984f
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Apr 23 03:22:46 2019 -0400
Exclude static-text leaf nodes when checking for and caching selected text
src/orca/scripts/web/script_utilities.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 094a5a575..591e9710f 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1631,6 +1631,9 @@ class Utilities(script_utilities.Utilities):
return contents
def hasPresentableText(self, obj):
+ if self.isStaticTextLeaf(obj):
+ return False
+
text = self.queryNonEmptyText(obj)
if not text:
return False
@@ -1653,7 +1656,7 @@ class Utilities(script_utilities.Utilities):
return True
handled = False
- descendants = pyatspi.findAllDescendants(obj, lambda x: self.hasPresentableText)
+ descendants = self.findAllDescendants(obj, self.hasPresentableText)
for descendant in descendants:
if handled:
super().updateCachedTextSelection(descendant)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]