Avoid irrelevant scroll-action searches in Mac snapshots (#24731)

Check the current pure action name before searching for vertical scroll actions in the same immutable array.
This commit is contained in:
Neil
2026-10-03 00:14:03 -07:00
committed by GitHub
parent 9e11375a67
commit 832caea15d
2 changed files with 30 additions and 2 deletions
@@ -109,8 +109,8 @@ public enum SnapshotRenderHeuristics {
return action != "AXCancel" && action != "AXPick"
}
if role == "AXScrollArea",
(rawActions.contains("AXScrollUpByPage") || rawActions.contains("AXScrollDownByPage")),
action == "AXScrollLeftByPage" || action == "AXScrollRightByPage" {
action == "AXScrollLeftByPage" || action == "AXScrollRightByPage",
(rawActions.contains("AXScrollUpByPage") || rawActions.contains("AXScrollDownByPage")) {
return false
}
return true