NoriginMedia / Norigin-Spatial-Navigation

React Hooks based Spatial Navigation (Key & Remote Control Navigation) / Web Browsers, Smart TVs and Connected TVs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

using stack navigatior not able to find the focus in react-native-web.

taj567 opened this issue · comments

Can anyone have the solution, using the component directly focus is working fine where using stack navigator focus is not displaying after reaching to end or corners...

Screen.Recording.2023-11-07.at.12.45.24.PM.mov

@zemlanin is i use the react-router-dom navigation also getting the same focus issue.

Hi.
Do you have multiple pages active in the stack navigation? Have you tried to debug it and see what is getting focus?
You can try to use isFocusBoundary on the page container. There is obviously something "hidden" that is getting focus when you move out of the container.

Hi. Do you have multiple pages active in the stack navigation? Have you tried to debug it and see what is getting focus? You can try to use isFocusBoundary on the page container. There is obviously something "hidden" that is getting focus when you move out of the container.

Hello @asgvard, I am also facing same problem.

  1. Yes We had multiple pages active in Stack Navigation. Yes I debugged current focus key using 'getCurrentFocusKey()'.
    current focus key is present in my active screen only.
  2. Yes I used 'isFocusBoundary' to keep my focus inside it's boundaries.

On my page I used [ FYI, I added isFocusBoundary as true ] 'focusBoundaryDirections' as 'left' side. But still it's blocking all the directions. I want to shift my focus from one page to another page in a particular direction. but 'focusBoundaryDirections' is not working as expected.

I am hoping you may review my problem.

Thank you.

Hello @asgvard,

I am using Stack Navigator for multiple Screen in my project in Initial Screen the Focus is working very fine,but when i am navigating to another screen,and moving up on card in 0 th index ,the focus is disappering, iam using isFocusBoundary for disable the focus to go up, but still iam facing same issue,

i hope you find some solution for it
thank you

Hello @asgvard , Thank you for responding.

i have tried with the isFocusBoundary also getting the same issue as mentioned by @GitHubShasiKumar .

commented

@taj567: Could you please provide some code snippets or an example projects of what you are doing that is resulting in this issue?

The video is helpful to see the issue reproduced, but it's difficult to say what could be causing this without further detail.

I've runned into the same issue but setting isFocusBoundary: true for each page fixed it