1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-14 19:02:33 +03:00

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