Skip to content

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

Merged
houko merged 4 commits into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2310
Nov 26, 2026
Merged

houko merged 4 commits 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
@houko houko self-assigned this Nov 25, 2026

@houko houko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android routing change and its regression test match issue #2310. The focused routing test and Android check pass locally.

I cannot approve this pull request yet because the current Test workflow has a failed Apple job at internal/testhost/testdata/keys/mobilekeys_test.go:150 in TestMenuAutoEditingKey. The branch is mergeable, but a required repository workflow is still red, so the implementation evidence is incomplete. Please rerun or fix the failing workflow and provide a green full check before approval.

@houko houko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source-level review against #2310. In NsgoView.Group.route, an overflow probe outside a non-Group child's bounds is now accepted only when touchHit(child, x, y) finds an actual descendant hit. Group probes retain their special childrenOnly behavior, and hit slop still bypasses the descendant check. This preserves overflow descendants and hit slop while preventing an unrelated clickable sibling from claiming a touch that landed on an earlier input or button. The regression covers focus, button press, and link press independently. I found no source-level defect. The current Apple workflow failure must be resolved before merge.

@github-actions github-actions Bot added size/S and removed size/XS labels Nov 26, 2026
@houko
houko merged commit 86a1d3c into nsgo-dev:main Nov 26, 2026
31 checks passed
@J4ck1e2000
J4ck1e2000 deleted the fix/issue-2310 branch November 26, 2026 02:38
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/S

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

2 participants