mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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.
This commit is contained in:
parent
6c6b709b2c
commit
4ea7075c1d
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user