Skip to content

fix(android): keep overflow probes from stealing touches - #2323

Open
J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2310
Open

J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2310

Conversation

@J4ck1e2000

Copy link
Copy Markdown
Contributor

Summary

Fixes #2310.

An overflow probe now reaches a native container such as clickable text only when its bounds or hit slop hold the touch, or a descendant is actually hit. This keeps clickable text from taking taps meant for an earlier input or button without disabling hit slop or nested transformed overflow. The regression checks that the input focuses and that the button and link each receive their own tap.

Targets

  • Android

Screenshots

None. Touch routing only.

Verification

  • go tool nsgo check -target android_arm64 -jobs 2 ./internal/testhost/testdata/press
  • Rebuilt the Java runtime with internal/platform/android/runtime/build.sh in a temporary directory and used the results via a Go overlay. The tracked classes.dex and classes.jar are unchanged.
  • go tool nsgo test -target android -device emulator-5562 -timeout 2m -run '^(TestClickableTextDoesNotStealSiblingTouches|TestPressRoutingDoesNotDisableSiblings|TestDeclinedRoutingLeavesPansToTheTouchedViews|TestOverflowPressLeavesItsContainersPressable|TestPressRoutingUsesNestedTransforms|TestPressReportsFocus)$' ./internal/testhost/testdata/press — 6 passed on an arm64 Android API 36 emulator.

Checklist

  • Conventional Commit title.
  • Updated the interaction docs and added a changelog fragment.
  • No new third-party code, assets or dependencies.

🤖 openai-codex/gpt-6.2-sol

Only probe native containers outside their hit bounds when a descendant is hit.
Preserve routed overflow and hit slop, and cover input focus and sibling presses.

Fixes nsgo-dev#2310
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation Android size/XS labels Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android bug Something isn't working documentation Improvements or additions to documentation size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: a touch inside a container reaches a later clickable sibling — inputs never focus, buttons never press

1 participant