Skip to content

fix(runtime): hit-test captured presses against the drawn rect - #5

Merged
kitlangton merged 1 commit into
devfrom
fix/scrolled-click-capture
Oct 23, 2026
Merged

kitlangton merged 1 commit into
devfrom
fix/scrolled-click-capture

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What it does. After scrolling a view, elements below the fold stopped responding to clicks. Found running Hex's Rune macOS host on a real Mac: Settings rows below the fold, such as Launch at login, did nothing.

How it works. While a press is captured, pointer_move decides whether the pointer is still inside the pressed element. It used target, the element's unscrolled layout rect. It now uses the rect the element was drawn at (from hits), falling back to target when there is none.

Risk. Runtime pointer handling only. Unscrolled views are unchanged, since the drawn and layout rects match. Drag coordinates still use target; I didn't touch them.

Proof. New test presses_land_inside_a_scrolled_view scrolls a list and presses a row below the fold. It fails without the change and passes with it.

  • cargo test -p rune --lib presses_land: 1 passed
  • cargo fmt --check and cargo clippy -p rune --all-targets -- -D warnings: both already fail on the base branch (formatting diffs across the crate, 21 clippy errors); I didn't fix them here.

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