File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -229,11 +229,10 @@ - (void)_updateReactTouchAtIndex:(NSInteger)touchIndex
229229 NSEvent *nativeTouch = _nativeTouches[touchIndex];
230230 CGPoint location = nativeTouch.locationInWindow ;
231231 RCTAssert (_cachedRootView, @" We were unable to find a root view for the touch" );
232- CGPoint rootViewLocation = [_cachedRootView.window.contentView convertPoint: location toView: _cachedRootView];
232+ CGPoint rootViewLocation = [_cachedRootView convertPoint: location fromView: nil ];
233+
233234 NSView *touchView = _touchViews[touchIndex];
234235 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 ;
237236#endif // macOS]
238237
239238 NSMutableDictionary *reactTouch = _reactTouches[touchIndex];
You can’t perform that action at this time.
0 commit comments