We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1473505 commit f8e4b17Copy full SHA for f8e4b17
React/Base/RCTTouchHandler.m
@@ -232,6 +232,8 @@ - (void)_updateReactTouchAtIndex:(NSInteger)touchIndex
232
CGPoint rootViewLocation = [_cachedRootView.window.contentView convertPoint:location toView:_cachedRootView];
233
NSView *touchView = _touchViews[touchIndex];
234
CGPoint touchViewLocation = [touchView convertPoint:location fromView:nil];
235
+ // JavaScript expects coordinates to have (0,0) at top left, unlike the macOS coordinate system
236
+ rootViewLocation.y = NSHeight([[_cachedRootView window] frame]) - rootViewLocation.y;
237
#endif // macOS]
238
239
NSMutableDictionary *reactTouch = _reactTouches[touchIndex];
0 commit comments