From 149aa2ffc1f7f661c328099684d4d07eba1d15ac Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 11 Dec 2015 10:30:18 +0100 Subject: [PATCH] [FIX] im_livechat: close window If the user clicks twice on the 'x', the chat window is closed --- addons/im_livechat/static/src/js/im_livechat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/im_livechat/static/src/js/im_livechat.js b/addons/im_livechat/static/src/js/im_livechat.js index 7220f165dfe..fb957681276 100644 --- a/addons/im_livechat/static/src/js/im_livechat.js +++ b/addons/im_livechat/static/src/js/im_livechat.js @@ -102,7 +102,8 @@ var LivechatButton = Widget.extend({ self.$el.hide(); }); this.chat_window.on("close_chat_session", this, function () { - if (this.messages.length > 1) { + var input_disabled = this.chat_window.$(".o_chat_input input").prop('disabled') + if (this.messages.length > 1 && !input_disabled) { this.ask_feedback(); } else { this.close_chat();