[orca] Clear flat review context when page tab lists emit selection-changed



commit a14abd7c7e5d958f14432b6192a114cf7e9f0f09
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Oct 29 18:24:43 2021 +0200

    Clear flat review context when page tab lists emit selection-changed
    
    If a wizard-like notebook page being reviewed changes, we might not get
    any events to update the locusOfFocus. As a result, subsequent flat
    review commands will continue to present the stale content.

 src/orca/scripts/default.py | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index e60045f3f..6e06eb6db 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2620,6 +2620,12 @@ class Script(script.Script):
             entry = self.utilities.getEntryForEditableComboBox(event.source)
             if entry and entry.getState().contains(pyatspi.STATE_FOCUSED):
                 return
+
+        # If a wizard-like notebook page being reviewed changes, we might not get
+        # any events to update the locusOfFocus. As a result, subsequent flat
+        # review commands will continue to present the stale content.
+        if role == pyatspi.ROLE_PAGE_TAB_LIST and self.flatReviewContext:
+            self.flatReviewContext = None
  
         mouseReviewItem = mouse_review.reviewer.getCurrentItem()
         selectedChildren = self.utilities.selectedChildren(obj)


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