[orca] Be sure we have the active document in descendantAtPoint
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Be sure we have the active document in descendantAtPoint
- Date: Wed, 20 Nov 2019 22:46:42 +0000 (UTC)
commit 20196e0484489d801c0a14f26277ed8e70233299
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Nov 20 17:46:20 2019 -0500
Be sure we have the active document in descendantAtPoint
src/orca/scripts/web/script_utilities.py | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index b68c18a63..53669edf8 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4581,6 +4581,13 @@ class Utilities(script_utilities.Utilities):
if not self.inDocumentContent(root):
return super().descendantAtPoint(root, x, y, coordType)
+ if self.isDocument(root):
+ active = self.activeDocument()
+ if active and root != active:
+ msg = "WEB: %s is not active. Updating to %s." % (root, active)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ root = active
+
isMatch = lambda o: self.containsPoint(o, x, y, coordType)
candidates = self.findAllDescendants(root, isMatch)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]