diff options
-rw-r--r-- | web/react/components/mention_list.jsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/react/components/mention_list.jsx b/web/react/components/mention_list.jsx index 6b1d98cf6..e6b2f5e04 100644 --- a/web/react/components/mention_list.jsx +++ b/web/react/components/mention_list.jsx @@ -70,6 +70,11 @@ module.exports = React.createClass({ PostStore.removeMentionDataChangeListener(this._onChange); $('body').off('keypress.mentionlist', '#'+this.props.id); }, + componentDidUpdate: function() { + if (this.state.mentionText != "-1" && !this.getSelection(this.state.selectedMention)) { + this.refs.mention0.select(); + } + }, _onChange: function(id, mentionText, excludeList) { if (id !== this.props.id) return; |