summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-07-03 15:05:33 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-07-03 15:05:33 -0400
commit4a3003c0dcf7d642f233493e32b07beed5d08327 (patch)
tree6f3f3f997ace4370efe7ae389feca6bafbb6421a /web/react/components
parent5b59e38a215f42de167bbc063c78749e765dd1e4 (diff)
parentd47c86b9217d24add8612767b73dab9455bb134b (diff)
downloadchat-4a3003c0dcf7d642f233493e32b07beed5d08327.tar.gz
chat-4a3003c0dcf7d642f233493e32b07beed5d08327.tar.bz2
chat-4a3003c0dcf7d642f233493e32b07beed5d08327.zip
Merge pull request #116 from nickago/MM-1341
MM-1341 mention auto-complete now goes away if you move off it's specific textbox
Diffstat (limited to 'web/react/components')
-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 eb21e0efe..2fecc129a 100644
--- a/web/react/components/mention_list.jsx
+++ b/web/react/components/mention_list.jsx
@@ -23,6 +23,11 @@ module.exports = React.createClass({
}
}
);
+ $(document).click(function() {
+ if($('#'+self.props.id).length && $('#'+self.props.id).get(0) !== $(':focus').get(0)) {
+ self.setState({mentionText: "-1"})
+ }
+ });
},
componentWillUnmount: function() {
PostStore.removeMentionDataChangeListener(this._onChange);