-
-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] RectButton does not trigger onPress when nested inside ReanimatedSwippeable #3217
Comments
same here :/ any solution? |
Also seeing this using "react-native-gesture-handler": "^2.21.2" |
Hey, could you please confirm this issue still occurs on the latest Gesture Handler release ( Collapsed codeimport React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { RectButton } from 'react-native-gesture-handler';
import Swipeable from 'react-native-gesture-handler/ReanimatedSwipeable';
export default function EmptyExample() {
return (
<View style={styles.container}>
<Swipeable containerStyle={styles.swipeable}>
<RectButton
style={styles.button}
onPress={() => console.log('Pressed: RectButton inside Swipeable')}
rippleColor={'tomato'}>
<Text>RectButton inside Swipeable</Text>
</RectButton>
</Swipeable>
<View style={styles.swipeable}>
<RectButton
style={styles.button}
onPress={() => console.log('Pressed: RectButton inside View')}
rippleColor={'tomato'}>
<Text>RectButton inside View</Text>
</RectButton>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
gap: 20,
},
button: {
width: 210,
height: 50,
backgroundColor: 'pink',
alignItems: 'center',
justifyContent: 'center',
},
swipeable: {
width: 400,
height: 60,
backgroundColor: 'orange',
alignItems: 'center',
justifyContent: 'center',
},
}); And Also, the repro you provided |
Hi there, stumbled upon this as well and can provide more context:
I attached a screen recording Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-03.at.14.52.46.mp4 |
Description
When
RectButton
is nested insideReanimatedSwippeable
, it does not trigger theonPress
callback unless you longpress.
Screen.Recording.2024-11-15.at.4.27.39.PM.mov
Steps to reproduce
RectButton
inside aReanimatedSwipeable
and try to trigger theonPress
callback.Snack or a link to a repository
https://github.com/focux/expo-rect-swipeable-bug
Gesture Handler version
2.21.0
React Native version
0.74.5
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: