Skip to content

Fail a click that cannot land - #40

Merged
Mpdreamz merged 1 commit into
mainfrom
feature/click-hit-test
Nov 10, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
feature/click-hit-test

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

Why

Reported from docs-builder journeys: find role link click --name "Quick reference" --exact completed with no error while the click did nothing, with no request and no URL change. Chrome delivers Input.dispatchMouseEvent to whatever is at the point, so a click on a covered or off-screen element "succeeds", and the failure shows at a later step that times out far from the cause.

What

  • click, dblclick, hover, check, uncheck and the source of drag check elementFromPoint at the point they are about to press (descending into shadow roots). Scrolling and a drag's target press nothing, so they are unchanged.
  • It waits, like Playwright's "receives events", because covers are often transient (a banner fading out). If it stays, the step fails at the click: Timed out after 5s waiting for role link --name … to receive a click at (84, 412): <div#cookie-banner.banner> would receive it instead., or nothing is there: it is outside the viewport or clipped.
  • Counted as a hit: the element, anything inside it, or a <label> whose control is the element (custom switches hide their input under the label). pointer-events: none is skipped by the browser, as for a real click.
  • The Playwright runner needs no change: its actions already wait to receive events.
  • Docs: commands page; DECISIONS.

Verification

New fixture page and live tests: uncovered click lands, covered click fails naming the cover and never sends the click, a cover that goes away is waited out, pointer-events: none passes through, off-screen, custom switch through its label, element inside a button, hover and drag source, and the same failure as a journey step. All 435 .NET tests pass, existing click tests included. Made the hit check accept anything once: 5 of 9 new tests failed.

No release or publish.

🤖 Generated with Claude Code

click, dblclick, hover, check, uncheck and the source of a drag check what is at the point they press, wait while
something else would receive it, and fail naming what does (or that nothing is there). Before, a click on a covered
or off-screen element reported success and a later step timed out far from the cause.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz force-pushed the feature/click-hit-test branch from 8329dca to 5e97430 Compare November 10, 2026 11:05
@Mpdreamz
Mpdreamz merged commit d514463 into main Nov 10, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant