Merge pull request #5354 from doochik/textinput-selectionstate-focus-blur

TextInput should call blur and focus methods of selectionState
This commit is contained in:
Andrei-Ovidiu Coman 2016-02-02 10:39:56 +00:00
Родитель fa4a5afe35 5ea4d397a9
Коммит f3ffafb756
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -525,6 +525,10 @@ var TextInput = React.createClass({
if (this.props.onFocus) {
this.props.onFocus(event);
}
if (this.props.selectionState) {
this.props.selectionState.focus();
}
},
_onPress: function(event: Event) {
@ -565,6 +569,10 @@ var TextInput = React.createClass({
if (this.props.onBlur) {
this.props.onBlur(event);
}
if (this.props.selectionState) {
this.props.selectionState.blur();
}
},
_onTextInput: function(event: Event) {