Clear iOS touch hover and preserve cancellation - #3
Merged
Conversation
Co-authored-by: Codex <codex@openai.com>
huacnlee
added a commit
that referenced
this pull request
Sep 11, 2026
## Summary Apply the iOS touch cleanup from #3 to Android. After touch release/cancellation and every momentum frame, move the synthetic pointer outside the window and emit MouseExited so hover does not remain on the last control. Preserve original coordinates for click and scroll dispatch. Handle ACTION_CANCEL independently: discard queued coalesced scroll, reset velocity, stop inertia, and emit ScrollWheel(Cancelled) for an active scroll. Never turn cancellation into a tap or fling, and ignore stray moves with no active touch. Add regression tests and update an existing test to use the renamed gpu_specs API. ## Test Plan - Android arm64/API 31 cargo-ndk library check passed. - Built the Android unit-test executable and ran touch tests on an Android API 34 arm64 emulator: 5 passed. - Tests cover tap coordinates, pending-tap cancellation, coalesced-scroll cancellation, and post-momentum hover cleanup. - This verification covers platform event dispatch; Android app UI testing is ongoing separately. Co-authored-by: Codex <codex@openai.com>
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.
Summary
A released iOS touch currently leaves GPUI's synthetic mouse over the last control, keeping hover feedback active. Clear the pointer hit test and emit MouseExited after touch end/cancellation and momentum frames, while preserving the original position for click and scroll dispatch.
Handle UIKit cancellation separately so it never commits a deferred tap or starts a momentum fling. Cancel an active scroll with TouchPhase::Cancelled.
Update the example's GPUI Kit revision to include mobile tooltip suppression, tap-triggered HoverCard behavior, and the inline is_mobile helper from longbridge/gpui-kit#3045.
Test Plan