File tree 1 file changed +2
-3
lines changed
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
229
229
NSEvent *nativeTouch = _nativeTouches[touchIndex];
230
230
CGPoint location = nativeTouch.locationInWindow ;
231
231
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
+
233
234
NSView *touchView = _touchViews[touchIndex];
234
235
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
236
#endif // macOS]
238
237
239
238
NSMutableDictionary *reactTouch = _reactTouches[touchIndex];
You can’t perform that action at this time.
0 commit comments