calintamas / react-native-toast-message

Animated toast message component for React Native
MIT License
1.73k stars 265 forks source link

Can't dismiss inside React Navigation Modal #408

Open RGDEV2022 opened 2 years ago

RGDEV2022 commented 2 years ago

Can't dismiss the toast inside a react navigation modal presentation:'modal'

Steps to reproduce the behavior:

  1. Open a toast inside a modal and try dismiss it downwards

Video attached

I have included <Toast /> inside App.tsx and after the NavigatorContext

Anyone know what's going on here, the gesture to dismiss downwards is interfering with the modals pull down to dismiss.

Thanks!

RGDEV2022 commented 2 years ago

Package versions:

"expo": "^45.0.0", "react-native": "0.68.2", "react-native-toast-message": "^2.1.5", "@react-navigation/drawer": "^6.4.3", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.1.0", "@react-navigation/stack": "^6.2.3",

jacksonHendric commented 2 years ago

Seems to be an issue with using react native navigation native-stack on ios since the whole card (modal) is a target to pull down to dismiss. This interferes with the toast message swipe gesture.

Any way to solve this? Maybe a callback for the toast where you can know when the toast is being swiped so that gestures for the modal can be disabled?