react-native-outside-press icon indicating copy to clipboard operation
react-native-outside-press copied to clipboard

Cannot work with Pressable

Open Coolister-Ye opened this issue 1 year ago • 2 comments

I just found that outside-press cannot be work with <Pressable> element. Please find a minimal example below. Any suggestion would be helpful. I'm using this package with expo and web.

<Pressable>click here dosn't work</Pressable>
<OutsidePressHandler onOutsidePress={console.log("press outside")}>
  <Text>001</Text>
</OutsidePressHandler>

Coolister-Ye avatar Jul 23 '24 16:07 Coolister-Ye

I just encountered the same issue, is there a solution yet?

cf-david-m avatar Oct 02 '24 08:10 cf-david-m

I fixed the problem (for web) by replacing the onClick in Container and OutsidePressHandler components with onPointerDown. Can this create issues with other components than Pressable?

I forked the project and created a PR https://github.com/dcangulo/react-native-outside-press/pull/373

cf-david-m avatar Oct 02 '24 11:10 cf-david-m