Bug Description
1. Summary
When using react-native-snap-carousel , focus navigation does not work as expected. Pressing βUpβ from a carousel item does not move focus to the Tabmenu above the carousel. Instead, focus gets stuck inside the carousel, blocking navigation.
App Name: Frndlytv
Bug Severity:
Blocks current development
2. Steps to Reproduce
-
Launch the app
-
Navigate to the home screen with a
Tabmenuat the top and areact-native-snap-carouselbelow it. -
Focus on any item in the carousel.
-
Press the βUpβ key on the remote.
3. Observed Behavior
-
Focus does not move to the
Tabmenu. -
Focus remains trapped inside the carousel.
4. Expected Behavior
- Pressing βUpβ from a carousel item should transfer focus directly to the
Tabmenuabove.
4.a Possible Root Cause & Temporary Workaround
-
Possible Root Cause:
react-native-snap-carouseldoes not exposenextFocusUp/nextFocusDownsupport for navigation. -
Workarounds Tried:
-
Wrapped carousel in
TVFocusGuideViewβ no effect. -
Handled focus manually via
useTVEventHandlerβ partial workaround (not reliable). -
Tried
hasTVPreferredFocusβ only works once, not consistent after navigation.
-
5. Logs or Crash Report
No crashes observed. Issue is related to focus navigation.
6. Environment
-
SDK Version: 0.20.3207
-
App State: Foreground
-
OS Information (Fire TV):
cat /etc/os-release NAME="Ubuntu" VERSION="20.04.6 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.6 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal
7. Example Code Snippet / Screenshots / Screengrabs
<Tabmenu navigation={navigation} ref={tabButtonsRef} />
<TVFocusGuideView trapFocusLeft trapFocusRight style={styles.BannerGridContainer}>
<Carousel
ref={bannerRef}
data={bannerdatas[0].data}
renderItem={renderItem}
sliderWidth={viewportWidth}
itemWidth={700}
loop
autoplay={isautoPlay}
onSnapToItem={handleSnapToItem}
scrollEnabled={false}
hasTVPreferredFocus={preferredFocus}
/>
</TVFocusGuideView>
Screenshots: [Attach if possible]
Playback Issues
N/A β This is not a playback-related issue.
Additional Context
-
Prevents from navigating between main UI elements using the remote.
-
Blocks current development since focus navigation is essential .
βPlease find the Tabmenu.tsx file attached for reference. I would appreciate your assistance and providing the appropriate solution.β
Tabmenu.tsx (10.0 KB)
Regards,
Vittal maradi