From 6ec01085304c0c496786899c4c50ac4485c7e036 Mon Sep 17 00:00:00 2001 From: Riley <142751032+rileysay@users.noreply.github.com> Date: Wed, 9 Sep 2026 22:34:15 +1000 Subject: [PATCH 1/2] Preserve disabled button targets under box-none parents Keep RNGestureHandlerButton child hits in the box-none hit-test path so disabled foreground controls continue to block overlapping siblings instead of allowing touch-through. --- .../apple/RNGestureHandlerButton.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm b/packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm index a69a0123e2..3f2551b754 100644 --- a/packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm +++ b/packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm @@ -1473,7 +1473,9 @@ - (RNGHUIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event if (!subview.isHidden && subview.alpha > 0) { CGPoint convertedPoint = [subview convertPoint:point fromView:self]; UIView *hitView = [subview hitTest:convertedPoint withEvent:event]; - if (hitView != nil && [self shouldHandleTouch:hitView atPoint:point]) { + if (hitView != nil && + ([hitView isKindOfClass:[RNGestureHandlerButton class]] || + [self shouldHandleTouch:hitView atPoint:point])) { return hitView; } } From a1c6a9477107393fe34a26206fecdd45a0d60016 Mon Sep 17 00:00:00 2001 From: rileysay Date: Fri, 11 Sep 2026 01:44:26 +1000 Subject: [PATCH 2/2] Skip box-none and none buttons in shouldHandleTouch --- .../apple/RNGestureHandlerButton.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm b/packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm index 3f2551b754..4f28da6e1b 100644 --- a/packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm +++ b/packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm @@ -1197,7 +1197,6 @@ - (void)mouseDown:(NSEvent *)event return; } - _isTouchInsideBounds = YES; [self handleAnimatePressIn]; [super mouseDown:event]; @@ -1208,7 +1207,7 @@ - (void)mouseUp:(NSEvent *)event if (!_userEnabled) { return; } - + NSPoint locationInView = [self convertPoint:[event locationInWindow] fromView:nil]; _isHovered = NSPointInRect(locationInView, self.bounds); [self recordHoverSampleForMouseEvent:event]; @@ -1224,7 +1223,7 @@ - (void)mouseDragged:(NSEvent *)event if (!_userEnabled) { return; } - + NSPoint locationInWindow = [event locationInWindow]; NSPoint locationInView = [self convertPoint:locationInWindow fromView:nil]; BOOL currentlyInside = NSPointInRect(locationInView, self.bounds); @@ -1260,7 +1259,7 @@ - (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event if (!_userEnabled) { return NO; } - + _isTouchInsideBounds = YES; // A pencil's hover-out arrives just before touch-down but only schedules the // clear, so `_isHovered` still reflects the open hover. Under Reduce Motion @@ -1426,7 +1425,8 @@ - (BOOL)shouldHandleTouch:(RNGHUIView *)view atPoint:(CGPoint)point { if ([view isKindOfClass:[RNGestureHandlerButton class]]) { RNGestureHandlerButton *button = (RNGestureHandlerButton *)view; - return button.userEnabled; + return button.userEnabled && button.pointerEvents != RNGestureHandlerPointerEventsBoxNone && + button.pointerEvents != RNGestureHandlerPointerEventsNone; } // Certain subviews such as RCTViewComponentView have been observed to have disabled