Merge pull request #132 from mattermost/mm-1250

fixes mm-1250 mention highlights should now align in textbox
Этот коммит содержится в:
Corey Hulen
2015-07-06 13:57:29 -08:00
родитель 3dec509899 f1a2e48354
Коммит 5bdc7f3762
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@@ -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();
@@ -31,7 +31,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;