wix / react-native-navigation

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

Android (11,12,13) - ComponentDidDisappear doesn't invoke when user change tab & `bottomTabs.visible=false` #7705

Open retyui opened 1 year ago

retyui commented 1 year ago

What happened?


Navigation.events().registerComponentDidDisappearListener(event => {
   // event doesn't invoke on Android 13,12,11  :( when user jump between tabs 
})

I found out that Navigation.setDefaultOptions({bottomTabs: {visible: false},}); trigger this behavior

when visible:true then listener invoked as expected :(

Demo Android 13 (no disappear event):

https://user-images.githubusercontent.com/4661784/235298808-291aaf25-818a-4b67-b4cd-37b675b85753.mp4

Demo Android 10 (works well):

https://user-images.githubusercontent.com/4661784/235299681-3b5eed4f-4508-42c7-a0f2-b6f4bff52d97.mp4

Demo iOS:

https://user-images.githubusercontent.com/4661784/235299221-51d24b6d-d0f3-46e7-92b8-263c8be3234c.mov

What was the expected behaviour?

event should work the same as iOS and old Android versions

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

git clone https://github.com/retyui/wix-react-native-navigation-issues-7705
cd wix-react-native-navigation-issues-7705
yarn
yarn start 
yarn android # use Android 13,12,11

then in index.js:

Navigation.setDefaultOptions({
  bottomTabs: {
    visible: false, // <-- Change value to see differences (of invoking Appear/Disappear events)
  },
});

In what environment did this happen?

React Native Navigation version: 7.33.0-alpha.3 + 7.30.3 React Native version: 0.70.6 Has Fabric (React Native's new rendering system) enabled: no Node version: 16 Device model: pixel 7 pro Android version: 13

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

stale[bot] commented 12 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

retyui commented 12 months ago

no