🐛 Bug Report
iOS and Android don't have the same behavior when you navigate inside a stack with bottom tabs and tap the active tab.
yep !
To Reproduce
navigate inside a sub screen of a stack ( so have 2 screens inside the stack, the root and a second one)
tap on the current active tab
Expected behavior
When you are inside a stack, I expect the tap on active bottom tab to popToRoot()
Actual Behavior
when you are inside a stack, and tap on active bottom tab
✅ on iOS it's worked, popToRoot()
❌on android... nothing append
**ANDROID**
20210219_210325.mp4
**IOS**
RPReplay_Final1613820856.MP4
Your Environment
" dependencies" : {
" react" : " 16.13.1" ,
" react-native" : " 0.63.4" ,
" react-native-navigation" : " ^7.10.0"
},
Platform: Android
Device info: tested on physical device, debug & release
Reproducible Demo
https://github.com/ludwig-pro/react-native-navigation-debug
Tap on the setting tab
Tap on the button "push new settings screen"
Tap on the current tab - Settings
i have found a workaround by listening event
React . useEffect ( ( ) => {
const listener = async ( event ) => {
await Navigation . popToRoot ( 'THE_HOME' ) ;
} ;
const unsubscribe = Navigation . events ( ) . registerBottomTabSelectedListener (
listener ,
) ;
return ( ) => {
unsubscribe . remove ( ) ;
} ;
} , [ ] ) ;
you can test it on the home stack:
Tap on the Home tab
Tap on the button "push new screen"
Tap on the current tab - Home -> it's pop to root :)
🐛 Bug Report
iOS and Android don't have the same behavior when you navigate inside a stack with bottom tabs and tap the active tab.
Have you read the Contributing Guidelines on issues?
yep !
To Reproduce
Expected behavior
When you are inside a stack, I expect the tap on active bottom tab to popToRoot()
Actual Behavior
when you are inside a stack, and tap on active bottom tab
**ANDROID**
20210219_210325.mp4
**IOS**
RPReplay_Final1613820856.MP4
Your Environment
Reproducible Demo
https://github.com/ludwig-pro/react-native-navigation-debug
i have found a workaround by listening event
you can test it on the home stack: