From b501a7a4e0b2206b65647b07143cb24cea0338c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Antoni=20Kwa=C5=9Bniewski?= Date: Thu, 8 Jan 2026 15:42:15 +0100 Subject: [PATCH] fix ios hitFrame --- .../apple/RNGestureHandler.mm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/react-native-gesture-handler/apple/RNGestureHandler.mm b/packages/react-native-gesture-handler/apple/RNGestureHandler.mm index f1ce6f1c9d..f151dde2ec 100644 --- a/packages/react-native-gesture-handler/apple/RNGestureHandler.mm +++ b/packages/react-native-gesture-handler/apple/RNGestureHandler.mm @@ -668,8 +668,15 @@ - (void)reset - (BOOL)containsPointInView { + CGRect bounds = _recognizer.view.bounds; CGPoint pt = [_recognizer locationInView:_recognizer.view]; - CGRect hitFrame = RNGHHitSlopInsetRect(_recognizer.view.bounds, _hitSlop); + + if (bounds.size.width == 0 and bounds.size.height == 0 and bounds.origin.x == 0 and bounds.origin.y == 0 and + _recognizer.view.subviews.count) { + bounds = _recognizer.view.subviews[0].bounds; + pt = [_recognizer locationInView:_recognizer.view.subviews[0]]; + } + CGRect hitFrame = RNGHHitSlopInsetRect(bounds, _hitSlop); return CGRectContainsPoint(hitFrame, pt); }