react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

fix(Android): Restore TV focus in Jetpack Compose views

Open msynowski opened this issue 6 months ago • 0 comments

Description

Currently, when navigating back to a screen containing a Compose-based view, lastFocusedChild is assigned to the internal AndroidComposeView leaving the screen without any focused element.

Instead of targeting the internal AndroidComposeView, Screens would restore it now to it's Android layout parent, that all custom RN views have, allowing developers to restore it back to compose via listeners or overriding the requestFocus method.

Changes

Restore focus from Jetpack Compose views to the parent Android layout, allowing to redirect it back to Compose via focus listeners/overriding requestFocus

msynowski avatar Oct 05 '25 13:10 msynowski