From 1a7a0ec4b330f19a307ef3a29df5aa9515d37c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Ku=CC=88hn?= Date: Fri, 26 Jan 2018 10:58:16 +0100 Subject: [PATCH] [FIX] mail: livechat: send message with chat_window Revision on c778de44c7cd9b7ef5a9a91738164ab0ebd0ca06 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. --- addons/mail/static/src/js/chat_window.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/js/chat_window.js b/addons/mail/static/src/js/chat_window.js index 0f728e00ba1..0c3a2270045 100644 --- a/addons/mail/static/src/js/chat_window.js +++ b/addons/mail/static/src/js/chat_window.js @@ -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); }