Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions React/Base/RCTTouchHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ - (void)_updateReactTouchAtIndex:(NSInteger)touchIndex
CGPoint rootViewLocation = [_cachedRootView.window.contentView convertPoint:location toView:_cachedRootView];
NSView *touchView = _touchViews[touchIndex];
CGPoint touchViewLocation = [touchView convertPoint:location fromView:nil];
// JavaScript expects coordinates to have (0,0) at top left, unlike the macOS coordinate system
rootViewLocation.y = NSHeight([[_cachedRootView window] frame]) - rootViewLocation.y;
#endif // macOS]

NSMutableDictionary *reactTouch = _reactTouches[touchIndex];
Expand Down