[orca] Don't search for caret context just because the old focus is null



commit cd3806a46391e08ff99831d5eb810316f37a7229
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jul 18 15:53:01 2019 -0400

    Don't search for caret context just because the old focus is null
    
    The old focus can be null if a menu gets destroyed because we closed
    it as a consequence of opening a new menu. In that case, we just want
    to update focus to the new menu.

 src/orca/scripts/web/script.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index b89e39853..183c568a4 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1179,7 +1179,7 @@ class Script(default.Script):
             return False
 
         caretOffset = 0
-        if not oldFocus or self.utilities.inFindToolbar(oldFocus) \
+        if self.utilities.inFindToolbar(oldFocus) \
            or (self.utilities.isDocument(newFocus) and oldFocus == orca_state.activeWindow):
             contextObj, contextOffset = self.utilities.getCaretContext()
             if contextObj and not self.utilities.isZombie(contextObj):


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