[FIX] mail: livechat: send message with chat_window
Revision on c778de44c7
The changes on chat_window are wrong, because the
composer uses an 'input', instead of a 'div'.
As a result, it was not possible to send messages
over im_livechat from the website.
This was not the case on the webclient: chat_window
is enhanced with extended_chat_window, which replaces
the composer with 'div', hence the changes are correct.
This commit is contained in:
@@ -132,13 +132,13 @@ return Widget.extend({
|
||||
event.stopPropagation(); // to prevent jquery's blockUI to cancel event
|
||||
// ENTER key (avoid requiring jquery ui for external livechat)
|
||||
if (event.which === 13) {
|
||||
var content = _.str.trim(this.$input.text());
|
||||
var content = _.str.trim(this.$input.val());
|
||||
var message = {
|
||||
content: content,
|
||||
attachment_ids: [],
|
||||
partner_ids: [],
|
||||
};
|
||||
this.$input.text('');
|
||||
this.$input.val('');
|
||||
if (content) {
|
||||
this.trigger('post_message', message, this.channel_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user