diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-07-12 12:49:33 -0700 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-07-16 08:10:18 -0700 |
commit | 6f93cbb490b41ec206b66018090f34e690a145a3 (patch) | |
tree | 341953d2e21fcdbb3e85fb9fce74614a06ea11c4 /web/react | |
parent | ce9756e44dcdc1dedb46337f492f4ede8719fdd8 (diff) | |
download | chat-6f93cbb490b41ec206b66018090f34e690a145a3.tar.gz chat-6f93cbb490b41ec206b66018090f34e690a145a3.tar.bz2 chat-6f93cbb490b41ec206b66018090f34e690a145a3.zip |
When moving from a mention lower in the list to one higher in the list by typing more, now properly highlights
Diffstat (limited to 'web/react')
-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; |