From 1a2fe0bb811e27f32201c7cef5068bb80a10184f Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Tue, 2 Jul 2024 13:06:35 +0200 Subject: [PATCH 1/3] Start looking for touch handler in superview in helper method --- ios/utils/UIView+RNSUtility.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/utils/UIView+RNSUtility.mm b/ios/utils/UIView+RNSUtility.mm index 6889b7445e..9c648956f3 100644 --- a/ios/utils/UIView+RNSUtility.mm +++ b/ios/utils/UIView+RNSUtility.mm @@ -9,7 +9,7 @@ @implementation UIView (RNSUtility) - (nullable RNS_TOUCH_HANDLER_ARCH_TYPE *)rnscreens_findTouchHandlerInAncestorChain { - UIView *parent = self; + UIView *parent = self.superview; #ifdef RCT_NEW_ARCH_ENABLED // On Fabric there is no view that exposes touchHandler above us in the view hierarchy, however it is still From 962edd9d95c5c3fae091bc980072b8f142dc70bf Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Tue, 2 Jul 2024 13:30:23 +0200 Subject: [PATCH 2/3] Add Test2223 --- apps/test-examples/App.js | 1 + apps/test-examples/src/Test2223.tsx | 92 +++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 apps/test-examples/src/Test2223.tsx diff --git a/apps/test-examples/App.js b/apps/test-examples/App.js index 825595aafc..781ef96a88 100644 --- a/apps/test-examples/App.js +++ b/apps/test-examples/App.js @@ -103,6 +103,7 @@ import Test2048 from './src/Test2048'; import Test2069 from './src/Test2069'; import Test2118 from './src/Test2118'; import Test2184 from './src/Test2184'; +import Test2223 from './src/Test2223'; import TestScreenAnimation from './src/TestScreenAnimation'; import TestHeader from './src/TestHeader'; diff --git a/apps/test-examples/src/Test2223.tsx b/apps/test-examples/src/Test2223.tsx new file mode 100644 index 0000000000..04bb70ab88 --- /dev/null +++ b/apps/test-examples/src/Test2223.tsx @@ -0,0 +1,92 @@ +import React from 'react'; +import { View, Text, Button, Pressable, StyleSheet, Alert } from 'react-native'; +import { NavigationContainer, useNavigation } from '@react-navigation/native'; +import { createNativeStackNavigator } from '@react-navigation/native-stack'; + +const Stack = createNativeStackNavigator(); // <-- change to createStackNavigator to see a difference +const NestedStack = createNativeStackNavigator(); + +export default function App() { + return ( + + + + + + + + ); +} + +function NestedStackScreen() { + return ( + + + + + ); +} + +function HomeScreen() { + const navigation = useNavigation(); + return ( + + Home Screen +