TextInput should call blur and focus methods of selectionState
DocumentSelectionState returns anchor and focus offsets only in focused state. So TextInput should set proper state to selectionState when blur and focus.
This commit is contained in:
parent
5ac848cd7f
commit
5ea4d397a9
|
@ -549,6 +549,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) {
|
||||
|
@ -589,6 +593,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) {
|
||||
|
|
Loading…
Reference in New Issue