From 4ea7075c1def9dce38f16a3c9bf0ed6fb6b2d441 Mon Sep 17 00:00:00 2001 From: najeira Date: Wed, 13 Dec 2017 06:22:53 +0900 Subject: [PATCH] Map iOS touches to Flutter view coordinate system (#4425) This change ensures that touches are mapped to the Flutter view co-ordinate system. In the case of a Flutter view that doesn't share the same origin and orientation as the screen co-ordinate system, touches were appled in the wrong location. This bug affected Flutter views whose origin was not the screen origin and Flutter apps running with the in-call status bar on iPhones other than the iPhone X. --- .../darwin/ios/framework/Source/FlutterViewController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 18d18939689..184d2b16615 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -483,7 +483,7 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to } FXL_DCHECK(device_id != 0); - CGPoint windowCoordinates = [touch locationInView:nil]; + CGPoint windowCoordinates = [touch locationInView:self.view]; blink::PointerData pointer_data; pointer_data.Clear();