Skip to content

Android: Calling TextInput instance's focus() after keyboard is closed via back button/submit doesn't bring up keyboard #11979

@aryo

Description

@aryo

Description

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 behavior of calling focus() should still apply.

Reproduction

<TouchableOpacity onPress={() => this.textInput.focus()}>
   <Text>Focus</Text>
</TouchableOpacity>
<TextInput ref={(component) => this.textInput = component}/>

Tap TextInput or TouchableOpacity to focus & bring up keyboard. Press back to dismiss keyboard. Tap TouchableOpacity -> no keyboard.

Additional Information

  • React Native version: 0.38
  • Platform: Android
  • Operating System: All

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions