react-native-true-sheet icon indicating copy to clipboard operation
react-native-true-sheet copied to clipboard

Android New Architecture no press event.

Open TomAtterton opened this issue 1 year ago • 5 comments

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

TomAtterton avatar Mar 03 '25 11:03 TomAtterton

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

antoine-cottineau avatar Mar 03 '25 13:03 antoine-cottineau

@TomAtterton @antoine-cottineau Can you create a repro repo that I can run? Thanks!

lodev09 avatar Mar 03 '25 15:03 lodev09

Can you checkout #156 and see if it works for you?

lodev09 avatar Mar 04 '25 10:03 lodev09

Hello there, sorry to reopen this issue, but I am having the exact same problem even after the new version. Same environment, same example.

joaomirandamanie avatar Mar 11 '25 11:03 joaomirandamanie

Added a link to a repro on the new issue: https://github.com/lodev09/react-native-true-sheet/issues/163#issuecomment-2721674507

delphinebugner avatar Mar 13 '25 15:03 delphinebugner