Android TV: touchables do not change appearance when focused inside a modal
See original GitHub issue“react-native”: “npm:react-native-tvos@0.63.1-1” Code Example using React Native modal code from docs:
<View style={{marginTop: 22}}>
<Modal
animationType="slide"
transparent={false}
visible={this.state.modalVisible}
onRequestClose={() => {
Alert.alert('Modal has been closed.');
}}>
<View style={{marginTop: 22}}>
<View>
<Text>Hello World!</Text>
<TouchableHighlight
onPress={() => {
this.setModalVisible(!this.state.modalVisible);
}}>
<Text>Hide Modal</Text>
</TouchableHighlight>
</View>
</View>
</Modal>
<TouchableHighlight
onPress={() => {
this.setModalVisible(true);
}}>
<Text>Show Modal</Text>
</TouchableHighlight>
</View>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
Android TV: touchables do not change appearance when ...
The specific issue is that buttons don't change their appearance when focused inside a modal. The buttons still work though -- you can...
Read more >Event handle on focus Touchable elements in Android TV
While I get focus on this element from another element (I'm sure they get focus while I see by changing styles). In this...
Read more >How to trap focus inside modal to make it ADA compliant
tab, shift + tab and enter key and focus should be trapped inside modal and should not go out after pressing tab key...
Read more >Modal · Bootstrap v5.2
Modals are built with HTML, CSS, and JavaScript. · Clicking on the modal “backdrop” will automatically close the modal. · Bootstrap only supports...
Read more >ScrollView
android :animateLayoutChanges, Defines whether changes in layout (caused by adding and removing items) should cause a LayoutTransition to run.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m actively working on this. The issue is that on Android, modal views are separate and not part of the ReactRootView hierarchy
Thanks for the submission @Sarvarr … I did reproduce this on Android TV emulator.
The specific issue is that buttons don’t change their appearance when focused inside a modal. The buttons still work though – you can use the arrow keys to select button 1 or button 2 in the example below, and pressing return will fire the button.
I’ll take a look to see what the issue is.