Skip to content

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

Closed
@narobertson42

Description

@narobertson42

Issue was closed and not fixed #11979

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 9.9.0
Yarn: 1.6.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3.1 Build version 9E501
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.3.2 => 16.3.2
react-native: 0.55.4 => 0.55.4

Steps to Reproduce

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.

Reproduction
<TouchableOpacity onPress={() => this.textInput.focus()}>
Focus

<TextInput ref={(component) => this.textInput = component}/>

Expected Behavior

Tap TouchableOpacity to focus. Press back to dismiss keyboard. Tap TouchableOpacity. Keyboard opens

Actual Behavior

Tap TouchableOpacity to focus. Press back to dismiss keyboard. Tap TouchableOpacity. Keyboard doesn't open

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: TextInputRelated to the TextInput component.Platform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions