Repository navigation
fix(macos): keep coordinate-click descendant presses at the click point - #127
Merged
Merged
Conversation
A coordinate click on a blank spot picked the window as its best record (it has AXRaise), could not press the window itself, then pressed the smallest pressable descendant anywhere in the window, often the close button. Descendant scans in performAXClickSequence now only press an element whose frame contains the click point (coordinate click) or overlaps the target's click frame (element click, including the nearby hit-test fallback). With nothing actionable at the point, the click falls through to the pid-posted mouse event there.
…t-click-review # Conflicts: # docs/releases/feature-release-notes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and fix
Coordinate clicks on blank space could scan the whole window and press an unrelated descendant, including Close. Descendant candidates now require a valid nonempty frame containing the coordinate point, or overlapping the indexed target.
The remaining window-index case is also fixed: clicking the AXWindow index skips descendant and nearby hit searches and uses the existing Raise/focus fallback. Explicit clicks on Close and ordinary buttons remain supported.
Merged current main (
74d86db, including #126's coordinate conversion and #139); preserved the original contributor commit.Validation
Reproduce:
node scripts/tests/macos-hit-test-smoke.mjs <signed-ocu-executable> --descendant-guardswith existing Accessibility/Screen Recording permissions and runtime admission on an unlocked Retina desktop.Limits
Tested on one physical Retina display. The completed run used
--allow-desktop-activitybecause the desktop was in use; this skips only foreground/pointer stability assertions, so no stability claim is made for that run. Global pointer fallbacks were disabled. Explicit window Raise may change focus by design. General mouse delivery to actionless custom views is separate from preventing wrong AX actions. Windows/Linux do not use this Swift AX path.