[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:
parent
70feab9d50
commit
5006eca4a8
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue