From ef6c14983d1e12e26b6e3f2ac8c95e36d681bf09 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Tue, 28 Jul 2015 15:02:28 -0700 Subject: [PATCH] Treat all UITouchPhaseCancelled on raw touches as pointerUp instead of pointerCancel. On iOS as soon as a gesture recognizer takes over it cancels all outstanding touches. R=@abarth --- sky/shell/ios/sky_surface.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sky/shell/ios/sky_surface.mm b/sky/shell/ios/sky_surface.mm index dc0bc8e88..7790df392 100644 --- a/sky/shell/ios/sky_surface.mm +++ b/sky/shell/ios/sky_surface.mm @@ -26,9 +26,11 @@ static inline sky::EventType EventTypeFromUITouchPhase(UITouchPhase phase) { // with the same coordinates return sky::EVENT_TYPE_POINTER_MOVE; case UITouchPhaseEnded: - return sky::EVENT_TYPE_POINTER_UP; case UITouchPhaseCancelled: - return sky::EVENT_TYPE_POINTER_CANCEL; + // We treat all cancels for raw touches as ups. + // All pointers hit UITouchPhaseCancelled as soon as a + // gesture is recognized. + return sky::EVENT_TYPE_POINTER_UP; } return sky::EVENT_TYPE_UNKNOWN; -- GitLab