[orca] Don't try to recover upon deletion of focused link



commit afedf918f065796397485864f1762e074fd1977e
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Oct 27 10:15:31 2017 -0400

    Don't try to recover upon deletion of focused link
    
    When the focused link goes away, we have no idea why. Rather than trying
    to recover, wait for a subsequent event (e.g. document load, children
    added, etc.) in the hopes it gives us what we need to update our location.

 src/orca/scripts/web/script.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index eeb39c5..f0e6839 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1842,6 +1842,11 @@ class Script(default.Script):
 
         obj, offset = self.utilities.getCaretContext(getZombieReplicant=False)
         if self.utilities.isZombie(obj):
+            if self.utilities.isLink(obj):
+                msg = "WEB: Focused link deleted. Taking no further action."
+                debug.println(debug.LEVEL_INFO, msg, True)
+                return True
+
             obj, offset = self.utilities.getCaretContext(getZombieReplicant=True)
             if obj:
                 orca.setLocusOfFocus(event, obj, notifyScript=False)


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