wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

The registerBottomTabLongPressedListener does not work on Android. #7817

Open Csmally opened 10 months ago

Csmally commented 10 months ago

What happened?

The registerBottomTabLongPressedListener does not work on Android. Long-pressing the bottom button on Android does not trigger the registerBottomTabLongPressedListener, but instead navigates to the corresponding route.

What was the expected behaviour?

When long-pressing the bottom navigation bar, the registerBottomTabLongPressedListener is triggered.

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

// does not work on Android. Navigation.events().registerBottomTabLongPressedListener(({ selectedTabIndex }) => { if (selectedTabIndex === 2) { Navigation.showOverlay({ component: { name: 'AddNewsScreen', options: { layout: { componentBackgroundColor: 'transparent', }, overlay: { interceptTouchOutside: true, }, }, }, }); } });

In what environment did this happen?

React Native Navigation version: 7.37.1 React Native version: 0.72.6 Has Fabric (React Native's new rendering system) enabled: (yes/no) yes Node version: 18.15.0 Device model: Pixel 6 Android version:Android 13