Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
taj567 opened this issue Nov 7, 2023 · 7 comments
Open
Assignees
Labels
question Further information is requested

Comments

@taj567
Copy link

taj567 commented Nov 7, 2023

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
@taj567
Copy link
Author

taj567 commented Nov 7, 2023

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

@asgvard
Copy link
Collaborator

asgvard commented Nov 8, 2023

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
Copy link

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
Copy link

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
Copy link
Author

taj567 commented Nov 14, 2023

Hello @asgvard , Thank you for responding.

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

@predikament
Copy link
Collaborator

@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
Copy link

jpbast commented Dec 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants