summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-07-12 12:49:33 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-07-16 08:10:18 -0700
commit6f93cbb490b41ec206b66018090f34e690a145a3 (patch)
tree341953d2e21fcdbb3e85fb9fce74614a06ea11c4 /web
parentce9756e44dcdc1dedb46337f492f4ede8719fdd8 (diff)
downloadchat-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')
-rw-r--r--web/react/components/mention_list.jsx5
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;