From f1a2e4835477c81863625c4460fd363876de0f07 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Wed, 17 Jun 2015 09:23:19 -0400
Subject: fixes mm-1250 mention highlights should now align in textbox

---
 web/react/components/mention_list.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'web/react/components/mention_list.jsx')

diff --git a/web/react/components/mention_list.jsx b/web/react/components/mention_list.jsx
index 8b7e25b04..2731d2596 100644
--- a/web/react/components/mention_list.jsx
+++ b/web/react/components/mention_list.jsx
@@ -14,7 +14,7 @@ module.exports = React.createClass({
         PostStore.addMentionDataChangeListener(this._onChange);
 
         var self = this;
-        $('#'+this.props.id).on('keypress.mentionlist',
+        $('body').on('keypress.mentionlist', '#'+this.props.id,
             function(e) {
                 if (!self.isEmpty() && self.state.mentionText != '-1' && e.which === 13) {
                     e.stopPropagation();
@@ -26,7 +26,7 @@ module.exports = React.createClass({
     },
     componentWillUnmount: function() {
         PostStore.removeMentionDataChangeListener(this._onChange);
-        $('#'+this.props.id).off('keypress.mentionlist');
+        $('body').off('keypress.mentionlist', '#'+this.props.id);
     },
     _onChange: function(id, mentionText, excludeList) {
         if (id !== this.props.id) return;
-- 
cgit v1.2.3-1-g7c22

