From 489d21a6535f04a061684544888980c8be453ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Antoni=20Kwa=C5=9Bniewski?= Date: Tue, 10 Feb 2026 10:39:13 +0100 Subject: [PATCH 1/3] fix pressable --- .../src/components/Pressable/Pressable.tsx | 41 ++++++++++--------- .../src/v3/components/Pressable.tsx | 41 ++++++++++--------- 2 files changed, 44 insertions(+), 38 deletions(-) diff --git a/packages/react-native-gesture-handler/src/components/Pressable/Pressable.tsx b/packages/react-native-gesture-handler/src/components/Pressable/Pressable.tsx index 8d8bf3eee7..3544644f8f 100644 --- a/packages/react-native-gesture-handler/src/components/Pressable/Pressable.tsx +++ b/packages/react-native-gesture-handler/src/components/Pressable/Pressable.tsx @@ -17,6 +17,7 @@ import { LayoutChangeEvent, Platform, StyleProp, + View, ViewStyle, } from 'react-native'; import NativeButton from '../GestureHandlerButton'; @@ -367,25 +368,27 @@ const Pressable = (props: LegacyPressableProps) => { return ( - - {childrenProp} - {__DEV__ ? ( - - ) : null} - + + + {childrenProp} + {__DEV__ ? ( + + ) : null} + + ); }; diff --git a/packages/react-native-gesture-handler/src/v3/components/Pressable.tsx b/packages/react-native-gesture-handler/src/v3/components/Pressable.tsx index 50d3ce15e5..1482d18d62 100644 --- a/packages/react-native-gesture-handler/src/v3/components/Pressable.tsx +++ b/packages/react-native-gesture-handler/src/v3/components/Pressable.tsx @@ -15,6 +15,7 @@ import { LayoutChangeEvent, Platform, StyleProp, + View, ViewStyle, } from 'react-native'; import { @@ -362,25 +363,27 @@ const Pressable = (props: PressableProps) => { return ( - - {childrenProp} - {__DEV__ ? ( - - ) : null} - + + + {childrenProp} + {__DEV__ ? ( + + ) : null} + + ); }; From 411eaf10ddcedce9338abfd2a6d0f8aa9f3ee873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Antoni=20Kwa=C5=9Bniewski?= Date: Thu, 12 Feb 2026 12:50:20 +0100 Subject: [PATCH 2/3] shadow node based fix --- ...NGestureHandlerButtonWrapperShadowNode.cpp | 4 +- .../src/components/Pressable/Pressable.tsx | 41 +++++++++---------- .../src/v3/components/Pressable.tsx | 41 +++++++++---------- 3 files changed, 41 insertions(+), 45 deletions(-) diff --git a/packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp b/packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp index 613498576e..350617d017 100644 --- a/packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp +++ b/packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp @@ -88,10 +88,12 @@ void RNGestureHandlerButtonWrapperShadowNode::layout( auto metrics = grandChild->getLayoutMetrics(); previousGrandChildLayoutMetrics_ = metrics; - mutableChild->setLayoutMetrics(metrics); + setLayoutMetrics(metrics); auto metricsNoOrigin = grandChild->getLayoutMetrics(); metricsNoOrigin.frame.origin = Point{}; + + mutableChild->setLayoutMetrics(metricsNoOrigin); mutableGrandChild->setLayoutMetrics(metricsNoOrigin); } diff --git a/packages/react-native-gesture-handler/src/components/Pressable/Pressable.tsx b/packages/react-native-gesture-handler/src/components/Pressable/Pressable.tsx index 3544644f8f..8d8bf3eee7 100644 --- a/packages/react-native-gesture-handler/src/components/Pressable/Pressable.tsx +++ b/packages/react-native-gesture-handler/src/components/Pressable/Pressable.tsx @@ -17,7 +17,6 @@ import { LayoutChangeEvent, Platform, StyleProp, - View, ViewStyle, } from 'react-native'; import NativeButton from '../GestureHandlerButton'; @@ -368,27 +367,25 @@ const Pressable = (props: LegacyPressableProps) => { return ( - - - {childrenProp} - {__DEV__ ? ( - - ) : null} - - + + {childrenProp} + {__DEV__ ? ( + + ) : null} + ); }; diff --git a/packages/react-native-gesture-handler/src/v3/components/Pressable.tsx b/packages/react-native-gesture-handler/src/v3/components/Pressable.tsx index 1482d18d62..50d3ce15e5 100644 --- a/packages/react-native-gesture-handler/src/v3/components/Pressable.tsx +++ b/packages/react-native-gesture-handler/src/v3/components/Pressable.tsx @@ -15,7 +15,6 @@ import { LayoutChangeEvent, Platform, StyleProp, - View, ViewStyle, } from 'react-native'; import { @@ -363,27 +362,25 @@ const Pressable = (props: PressableProps) => { return ( - - - {childrenProp} - {__DEV__ ? ( - - ) : null} - - + + {childrenProp} + {__DEV__ ? ( + + ) : null} + ); }; From 5e6f6b7498fe00df44057cf62492d794e996853a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Antoni=20Kwa=C5=9Bniewski?= Date: Fri, 13 Feb 2026 08:16:55 +0100 Subject: [PATCH 3/3] no change fix --- .../RNGestureHandlerButtonWrapperShadowNode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp b/packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp index 350617d017..682baf51f8 100644 --- a/packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp +++ b/packages/react-native-gesture-handler/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp @@ -77,10 +77,12 @@ void RNGestureHandlerButtonWrapperShadowNode::layout( // values if (shouldSkipCustomLayout) { react_native_assert(previousGrandChildLayoutMetrics_.has_value()); - mutableChild->setLayoutMetrics(previousGrandChildLayoutMetrics_.value()); + setLayoutMetrics(previousGrandChildLayoutMetrics_.value()); auto metricsNoOrigin = previousGrandChildLayoutMetrics_.value(); metricsNoOrigin.frame.origin = Point{}; + + mutableChild->setLayoutMetrics(metricsNoOrigin); mutableGrandChild->setLayoutMetrics(metricsNoOrigin); return; }