deselect editabletext when tabbing away

This commit is contained in:
Matthew Hodgson 2016-01-14 17:24:52 +00:00
parent d767e72469
commit 2899082cba

View file

@ -173,6 +173,9 @@ module.exports = React.createClass({
}, },
onBlur: function(ev) { onBlur: function(ev) {
var sel = window.getSelection();
sel.removeAllRanges();
if (this.props.blurToCancel) if (this.props.blurToCancel)
this.cancelEdit(); this.cancelEdit();
else else