|
|
@ -744,10 +744,15 @@ MessageComposer.prototype.setUpAutoComplete = function () { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
this.autoCompleteEl.on('mousedown', function (e) { |
|
|
|
this.autoCompleteEl.on('mousedown', function (e) { |
|
|
|
e = e.originalEvent || e; |
|
|
|
e = e.originalEvent || e; |
|
|
|
var target = $(e.target), mention, code, command, inlineID; |
|
|
|
var target = e.target; |
|
|
|
if (target[0].tagName != 'A') { |
|
|
|
var mention, code, command, inlineID; |
|
|
|
target = $(target[0].parentNode); |
|
|
|
while (target && target.tagName != 'A') { |
|
|
|
|
|
|
|
target = target.parentNode; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!target) { |
|
|
|
|
|
|
|
return cancelEvent(e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
target = $(target); |
|
|
|
if (code = target.attr('data-code')) { |
|
|
|
if (code = target.attr('data-code')) { |
|
|
|
if (self.onEmojiSelected) { |
|
|
|
if (self.onEmojiSelected) { |
|
|
|
self.onEmojiSelected(code, true); |
|
|
|
self.onEmojiSelected(code, true); |
|
|
|