NoriginMedia / Norigin-Spatial-Navigation

React Hooks based Spatial Navigation (Key & Remote Control Navigation) / Web Browsers, Smart TVs and Connected TVs
MIT License
330 stars 97 forks source link

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

Open taj567 opened 1 year ago

taj567 commented 1 year ago

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...

https://github.com/NoriginMedia/Norigin-Spatial-Navigation/assets/74459204/1e22710c-a05c-4f52-8975-893fffe8bb44

taj567 commented 1 year ago

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

asgvard commented 1 year ago

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.

BharathMarla commented 1 year ago

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.

GitHubShasiKumar commented 1 year ago

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

taj567 commented 1 year ago

Hello @asgvard , Thank you for responding.

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

predikament commented 1 year ago

@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.

jpbast commented 11 months ago

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