From 6f93cbb490b41ec206b66018090f34e690a145a3 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Sun, 12 Jul 2015 12:49:33 -0700 Subject: When moving from a mention lower in the list to one higher in the list by typing more, now properly highlights --- web/react/components/mention_list.jsx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web') 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; -- cgit v1.2.3-1-g7c22