Skip to content

calling .blur() on TextInput doesn't work #913

Open
@jbcullis

Description

@jbcullis

Environment

react-native 0.64.0:
npm ls react-native-macos: 0.64.13
node: 17.0.1
npm: 8.1.0
yarn: N/A
xcodebuild: 13A1030d

Steps to reproduce the bug

Create a TextInput with a ref, then call bur from the onPress of a TouchableWithoutFeedback

this.refs.txtInput.blur()

Expected Behavior

TextInput should lose focus.

Actual Behavior

TextInput retains focus.

Reproducible Demo

No response

Additional context

Workaround can be achieved using setNativeProps
this.refs.txtInput.setNativeProps({'editable':false});
this.refs.txtInput.setNativeProps({'editable':true});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions