[orca] Web: Fix presentation of table row when caret moves due to mouse click



commit d53ad4c0bb0e58e680b5a16c37121498257944f4
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jan 7 15:09:51 2021 +0100

    Web: Fix presentation of table row when caret moves due to mouse click
    
    Don't read the full row if the last input event was a mouse button
    event. We always generate the full line (i.e. each cell in the row)
    when the caret moves due to a mouse click. If we think we should
    read the full row for each cell in that row, we'll be extremely
    chatty and also fail to present the column headers.

 src/orca/script_utilities.py             | 3 +++
 src/orca/scripts/web/script_utilities.py | 3 +++
 2 files changed, 6 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index ec72e4395..22e970e48 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -5316,6 +5316,9 @@ class Utilities:
 
         return not mods or mods & keybindings.SHIFT_MODIFIER_MASK
 
+    def lastInputEventWasMouseButton(self):
+        return isinstance(orca_state.lastInputEvent, input_event.MouseButtonEvent)
+
     def lastInputEventWasPrimaryMouseClick(self):
         event = orca_state.lastInputEvent
         if isinstance(event, input_event.MouseButtonEvent):
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 61c9b5666..e24f289e5 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2848,6 +2848,9 @@ class Utilities(script_utilities.Utilities):
         if self.lastInputEventWasLineNav():
             return False
 
+        if self.lastInputEventWasMouseButton():
+            return False
+
         return True
 
     def isEntryDescendant(self, obj):


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