-
Notifications
You must be signed in to change notification settings - Fork 93
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
React Native, cannot connect native focus to Norigin focus #111
Comments
I tested a bit further. I noticed that using Pressable was probably not suitable and I switched to TouchableOpacity. I created an example here: https://github.com/MalteSchm/TestcaseFocusNoriginNav I used this app as tvOS and AndroidTV application. I expected that A screenshot of the result is shown below (both AndroidTV and tvOS applicaiton). The stylesheet specifies the focused button to be "red" which is not what I'm seeing here. |
In fact, focusSelf does not work in native mode.
|
Describe the bug
I tried connecting the native focus provided via RN (tvOS and AndroidTV) based on the example provided in the documentation but cannot make it work.
To Reproduce
I checked that the onFocus callback of Pressable is executed when I move around in my app. Based on the Norigin-Spatial-Navigation documentation:
In order to "sync" the focus events coming from the native focus engine to the hook the onFocus callback needs to be linked with the focusSelf method. This way the hook will know that the component became focused and will set the focused flag accordingly.
I would have expected that
focused
would change when focusSelf is called. This does not happen.Norigin Navigation is setup using
nativeMode: true
Expected behavior
I would have expected that
focused
would change when focusSelf is called.The text was updated successfully, but these errors were encountered: