[TextInput] Remove focus on TextInput if property `editable` is …

Summary:
Clicking on a TextField with editable set to false still would trigger a keyboard event.
In this case that the TextField was a multiline, it would scroll you down to the bottom.

Closes https://github.com/facebook/react-native/pull/1855
Github Author: Christopher <hello@blick-labs.com>
This commit is contained in:
Christopher 2015-07-15 08:23:48 -07:00
parent 70feab9d50
commit 5006eca4a8
1 changed files with 3 additions and 1 deletions

View File

@ -537,7 +537,9 @@ var TextInput = React.createClass({
},
_onPress: function(event: Event) {
if (this.props.editable || this.props.editable === undefined) {
this.focus();
}
},
_onChange: function(event: Event) {