You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: Calling TextInput instance's focus() after keyboard is closed via back button/submit doesn't bring up keyboard #19366
Calling focus() on a TextInput instance after keyboard is closed via Android back or submit/enter soft key doesn't bring keyboard back up.
Obviously, you can just tap on the TextInput itself to bring the keyboard back up, but the expected behaviour of calling focus() should still apply. The problem is a pain when the TextInput is hidden and their is a different representation of the TextInput's state, such as a custom pin code entry form.
@anhtukhtn that approach works sporadically, perhaps every tenth time. My workaround was to put my hidden TextInput behind my custom TextInputDisplay and allow clicks to pass through to the TextInput. It's not a great solution, but it works for my specific use case.
changed the title [-]Android: Calling TextInput instance's focus() after keyboard is closed via back button/submit doesn't bring up keyboard[/-][+]Android: Calling TextInput instance's focus() after keyboard is closed via back button/submit doesn't bring up keyboard [/+]on May 29, 2018
I also face this issue. It seems to happen only when there is a change of type of keyboard between two TextInput. @anhtukhtn, your approach always work for me. The only thing that must be done if you want the autofocus, is to implement this in your componentDidMount:
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Activity
anhtukhtn commentedon May 22, 2018
Do you solve the problem?
I work around by:
narobertson42 commentedon May 22, 2018
@anhtukhtn that approach works sporadically, perhaps every tenth time. My workaround was to put my hidden TextInput behind my custom TextInputDisplay and allow clicks to pass through to the TextInput. It's not a great solution, but it works for my specific use case.
react-native-bot commentedon May 23, 2018
Please run
react-native infoand update your issue.[-]Android: Calling TextInput instance's focus() after keyboard is closed via back button/submit doesn't bring up keyboard[/-][+]Android: Calling TextInput instance's focus() after keyboard is closed via back button/submit doesn't bring up keyboard [/+]climam commentedon Jun 27, 2018
I also face this issue. It seems to happen only when there is a change of type of keyboard between two TextInput. @anhtukhtn, your approach always work for me. The only thing that must be done if you want the autofocus, is to implement this in your componentDidMount:
This is pretty ugly but it does the job.
stale commentedon Dec 21, 2018
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
stale commentedon Dec 28, 2018
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.