NoriginMedia / react-spatial-navigation

DEPRECATED. HOC-based Spatial Navigation. NEW Hooks version is available here: https://github.com/NoriginMedia/norigin-spatial-navigation
MIT License
226 stars 64 forks source link

display none control #122

Closed toneyavuz closed 2 years ago

toneyavuz commented 2 years ago

I used the react-navigation stack for my application and the package doesn't remove the old pages, just changes the display none. I recorded a video.

I have no problem when I move between the active page buttons but sometimes my focus is lost on the active screen and focus on hidden pages.

Screen Shot 2022-04-29 at 8 18 57 PM

https://wetransfer.com/downloads/4b6a8eae305cd7fc60e0905e21a4941f20220429170949/3b82663c35e87e0ab11036fa9649968620220429171004/15e19d

asgvard commented 2 years ago

Hi!

Keep in mind that this library is no longer maintained. However the good news is that your problem can be solved by this feature: https://github.com/NoriginMedia/react-spatial-navigation#blocknavigationout-boolean If you set this to your Page component, it will block focus from going outside of it, i.e. to the hidden pages underneath.

toneyavuz commented 2 years ago

Thank you! @asgvard