Repository navigation
native2: never press a web row's nested control on a click (#195) - #210
Merged
Merged
Conversation
iamnbutler
force-pushed
the
fix-click-nested
branch
4 times, most recently
from
October 25, 2026 00:40
b226dc4 to
f11fd39
Compare
WebKit's AXPress on an ARIA menu item, button, tab or toggle presses the first native button inside it (WebCore nativeActionElement), so a point click on an Ace project row pressed its hover-only remove button. Such an element now gets a pointer click routed to its window at the point when that window is frontmost and Accessibility finds the element itself there, and is refused otherwise, naming the nested control. Press results name what was pressed. Fixes #195 Why: native2/Sources/DesktopMac/Pointer.swift#pressNestedSafely | WebKit's AXPress on an ARIA menuitem/button/tab presses the first native <button>/<select>/checkbox inside it; never AXPress such a web element Why: native2/Sources/DesktopMac/Pointer.swift#pressNestedSafely | a routed single click into a WKWebView window that isn't key in the active app is swallowed as first mouse, so it is only sent when the window is frontmost
iamnbutler
force-pushed
the
fix-click-nested
branch
from
October 25, 2026 00:53
f11fd39 to
214650c
Compare
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.
Fixes #195
Root cause. WebKit's
AXPresson an ARIA menu item, button, tab, toggle or list item presses the first native<button>/<select>/checkbox inside it (WebCoreAccessibilityNodeObject::actionElement→nativeActionElement). Ace's project rows are Base UIrole="menuitem"divs with a hover-only<button aria-label="Remove …">inside, so a point click on the row (which hit-tests to the AXMenuItem and presses it) pressed Remove.Fix (
DesktopMac/Pointer.swift,pressNestedSafely): before pressing a WebKit web element in those roles that holds a button/pop-up/checkbox/radio descendant, the hostEvery AX press result now carries
pressed: {role, label}; the guarded route addsnested_controland a note. Chromium apps are excluded (Chromium presses the node itself).Checked. Reproduced with a WKWebView fixture running Base UI 1.3 Menu + Tooltip in Ace's row markup, through the standalone host: before, a point click on the "desktop-tools" row logged
REMOVE desktop-tools; after, the click is refused with the message naming "Remove desktop-tools" (fixture app inactive), an element-ID click is refused (center lands off the row), a point click on the remove button itself presses it and sayspressed: AXButton "Remove desktop-tools", and the menu trigger still presses normally. Routed events reach the page (a routed double click selected the row). Not verified on an active WebKit window, since that would take keyboard focus. Unit tests inPressRedirectTests;swift testpasses.