[Android - Modal ] TextInput doesn't get focus
See original GitHub issueHello, I have 3 TextInput in a Modal, sadly some of the TextInput don’t get focus unless you click them twice. To be more accurate when you click the first time they seem to loose the focus as soon as they get them…
<Modal
animated={true}
visible={this.props.visibility}
onRequestClose={()=> this.props._hideModal()} >
<View style={{backgroundColor:'#ededed'}}>
<TextInput />
<TextInput />
<TextInput />
</View>
</Modal>
Another thing is that the status bar get the default grey color when the modal shows up Im using 0.23.1 on Windows and I’ve only test this on Android
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
TextInput sometimes doesn't focus when located in a Modal
When I open my Modal then I immediately tap the TextInput to get the focus, sometimes I have to tap twice before I...
Read more >TextInput - React Native
Two methods exposed via the native element are .focus() and .blur() that will focus or blur the TextInput programmatically. Note that some props ......
Read more >How to autoFocus a TextInput field within a Modal in React ...
I think the problem likely has to do with how the <Modal/> component is designed. You typically embed the <Modal/> on a screen...
Read more >Focus and text fields - Flutter documentation
To give focus to a text field as soon as it's visible, use the autofocus property. content_copy. TextField( autofocus: true, );.
Read more >Setting Focus For Accessibility In React Native - Dev Genius
There are times when you need to force the focus onto an element. In my case, I ran into an issue where a...
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
what is the solution to the problem? problem still exists. react-native v0.52
I am having the same issue when I present
TextInput
inside modal withautoFocus
on iOS. It works on Simulator, but on device, when modal is presented, keyboard doesn’t open. What’s more, the input itself is not focusable - that is any taps won’t trigger the keyboard. Turning that feature off solves the problem.