Repository navigation
fix(ios): keep a double tap's second touch from iPadOS 26's window double-tap interaction - #2387
Merged
Merged
Conversation
houko
force-pushed
the
fix/ipad-double-tap
branch
from
November 25, 2026 13:00
b7237fe to
3e9bcf7
Compare
…uble-tap interaction iPadOS 26 adds _UIDoubleTapInteraction to every window. Its recognizer (com.apple.UIKit._UIDoubleTapInteraction.tap) recognizes a double tap anywhere and cancels the touches in the view, so the second tap reached touchesCancelled instead of touchesEnded and OnPress never reported Clicks 2. NsgoWindow now turns off that recognizer's cancelsTouchesInView before delivering each touch event: the interaction still runs, and the view hears the tap end. apple-simulator runs TestPressesCountConsecutiveClicks on the iPad as its regression test.
houko
force-pushed
the
fix/ipad-double-tap
branch
from
November 25, 2026 13:37
3e9bcf7 to
1ccc7be
Compare
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
On iPadOS 26, a double tap on a pressable view reports only one press:
OnPressnever getsClicks: 2. apple-simulator'sTestPressesCountConsecutiveClicksfailed withpress counts = [1 1], want [1 2 1]every time it ran on the iPad Pro 13-inch (M5) simulator, and passed on an iPhone and on an iOS 18.4 iPad.Instrumenting
touchesBegan/touchesEnded/touchesCancelledon CI showed the second tap began withtapCount2 and then went totouchesCancelled, cancelled by a recognizer UIKit puts on every window on iPadOS 26:So the double-tap interaction recognizes the double tap and, as
cancelsTouchesInViewdefaults to YES, cancels the view's touches. A user's double tap on iPad loses its second click the same way.NsgoWindow.sendEvent:now turns that recognizer'scancelsTouchesInViewoff (matched by itsname) before delivering each touch event. The interaction still recognizes and runs; the view hears the tap end and reports both clicks. With the same change applied on CI, the test reported[1 2 1]on the iPadOS 26 iPad.As the regression test, apple-simulator now also runs
TestPressesCountConsecutiveClickson its iPad. The interaction document records the behavior.Verification
go tool nsgo check -target ios_simulator,ios: passes.TestPressesCountConsecutiveClicks,TestPanEndsAtTheLastOffset,TestPinchReportsScaleAndPhaseandTestPressAtFindsZoomedScrollContenton local iOS 18.4 iPhone 16 and iPad Air 13-inch (M3) simulators: pass.TestPressesCountConsecutiveClickspassing on the iPad Pro 13-inch (M5) iPadOS 26 simulator, where it failed every time before.