From 8b8cceac89a5962fb2bc52025702f2c023d41055 Mon Sep 17 00:00:00 2001 From: Emily Brown Date: Wed, 26 Nov 2025 14:28:41 -0800 Subject: [PATCH] Fix RCTDevLoadingView banner interaction (#54706) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54706 Changelog: [iOS][Fixed] - remove redundant gesture to tap button when the layer beneath is already tappable The dismiss button had a redundant tap handler when the entire banner was already tappable. **Redundant button interaction**: The dismiss button's `primaryAction` was removed and `userInteractionEnabled` is set to `NO`, making it purely visual. Taps on the button now pass through to the banner's tap gesture recognizer. Reviewed By: vzaidman Differential Revision: D87927449 fbshipit-source-id: af7dabff6f2ea23124d44bd21e82c789176f3acf --- .../react-native/React/CoreModules/RCTDevLoadingView.mm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm index db939adab8f..003076ce040 100644 --- a/packages/react-native/React/CoreModules/RCTDevLoadingView.mm +++ b/packages/react-native/React/CoreModules/RCTDevLoadingView.mm @@ -158,10 +158,9 @@ RCT_EXPORT_MODULE() buttonConfig.background.cornerRadius = 10; buttonConfig.baseForegroundColor = color; - UIAction *dismissAction = [UIAction actionWithHandler:^(__kindof UIAction *_Nonnull action) { - [self hide]; - }]; - self->_dismissButton = [UIButton buttonWithConfiguration:buttonConfig primaryAction:dismissAction]; + // Button is a visual cue to tap anywhere on the banner to dismiss so no seperate action is needed + self->_dismissButton = [UIButton buttonWithConfiguration:buttonConfig primaryAction:nil]; + self->_dismissButton.userInteractionEnabled = NO; self->_dismissButton.translatesAutoresizingMaskIntoConstraints = NO; // Prevent button from being compressed - force label to wrap instead