[orca] Web: Update our command state when a braille input event occurs



commit cd918de39c3eddaa23709a5010b05df1288a1237
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon May 25 17:12:21 2020 -0400

    Web: Update our command state when a braille input event occurs
    
    When the caret moves or focus changes as a direct consequence of an
    Orca command, we don't want to double-present the change. As a result,
    we keep track of the nature of the last input event. Because we were
    not doing this for braille input events, we sometimes had stale info
    and ignored events which should have been processed and possibly
    presented.

 src/orca/scripts/web/script.py | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index b5bdef113..72672e4d8 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -552,6 +552,14 @@ class Script(default.Script):
         self._lastCommandWasMouseButton = False
         return super().consumesKeyboardEvent(keyboardEvent)
 
+    def consumesBrailleEvent(self, brailleEvent):
+        """Returns True if the script will consume this braille event."""
+
+        self._lastCommandWasCaretNav = False
+        self._lastCommandWasStructNav = False
+        self._lastCommandWasMouseButton = False
+        return super().consumesBrailleEvent(brailleEvent)
+
     # TODO - JD: This needs to be moved out of the scripts.
     def textLines(self, obj, offset=None):
         """Creates a generator that can be used to iterate document content."""


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