[orca/gnome-3-36] Add more checks before treating non-focused text insertions as non-echoable



commit a7b142c04281b83bc78b0329bfbe47501fc3e813
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Mar 14 14:06:22 2020 -0400

    Add more checks before treating non-focused text insertions as non-echoable
    
    In some web editors (e.g. Blogger), text is inserted in elements which
    lack state focused. This was causing us to ingore the insertions. So
    also check for the focusable state and that the event source is not the
    locusOfFocus before reaching that conclusion.

 src/orca/script_utilities.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 2ce9a6753..fccef8c35 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -5214,8 +5214,9 @@ class Utilities:
             debug.println(debug.LEVEL_INFO, msg, True)
             return False
 
-        if not state.contains(pyatspi.STATE_FOCUSED):
-            msg = "INFO: Not echoable text insertion event: source is not focused"
+        if state.contains(pyatspi.STATE_FOCUSABLE) and not state.contains(pyatspi.STATE_FOCUSED) \
+           and event.source != orca_state.locusOfFocus:
+            msg = "INFO: Not echoable text insertion event: focusable source is not focused"
             debug.println(debug.LEVEL_INFO, msg, True)
             return False
 


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