Android New Architecture no press event.
Before submitting a new issue
- [x] I tested using the latest version of the library, as the bug might be already fixed.
- [x] I tested using a supported version of react native.
- [x] I checked for possible duplicate issues, with possible answers.
Bug summary
So bit of a weird issue when running the latest version 2.0.3 and the new architecture on android, the onPress events of children seem to be getting swallowed. I see that the interaction is happening with opacity changing but then no event is being sent to JS side meaning the onPress doesn't get triggered.
Not 100% sure if another library is conflicting I am running through the android code now but just though i'd raise this bug incase anyone else had encountered this.
Update: Holding the button with one finger and pressing with another seems to enable the event callback.
Library version
2.0.3
Environment info
"react-native": "^0.77.1",
Steps to reproduce
..
Reproducible example repository
N/A
I have the same issue but only on a physical device, press events are received in the emulator.
A simple reproducible example would be:
const Component = () => {
const ref = useRef<TrueSheet>(null);
return (
<>
<Button
title="Open"
onPress={() => {
ref.current?.present();
}}
/>
<TrueSheet ref={ref} sizes={['large']}>
<Button
title="Close"
onPress={() => {
ref.current?.dismiss();
}}
/>
</TrueSheet>
</>
);
};
When pressing the Close button, the bottom sheet never closes
@TomAtterton @antoine-cottineau Can you create a repro repo that I can run? Thanks!
Can you checkout #156 and see if it works for you?
Hello there, sorry to reopen this issue, but I am having the exact same problem even after the new version. Same environment, same example.
Added a link to a repro on the new issue: https://github.com/lodev09/react-native-true-sheet/issues/163#issuecomment-2721674507