From 295a6542833599fe4d05fea4f5cc4e360bcf98c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Fri, 11 Jan 2019 10:49:50 +0000 Subject: [PATCH] [FIX] mail: chat window positioning with discuss open Before this commit, the process of positioning chat windows could fail if one of the tabs had discuss open. When a chat window was hidden and become visible, the algorithm was not updating the state of the chat window to "visible" when discuss was open. As a result, it was always trying to make it visible, resulting in an infinite loop and raising the following error message: `Uncaught RangeError: Maximum call stack size exceeded` This commit ensures it works even when discuss is open. opw-1919327 closes odoo/odoo#30137 --- addons/mail/static/src/js/services/mail_window_manager.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/mail/static/src/js/services/mail_window_manager.js b/addons/mail/static/src/js/services/mail_window_manager.js index 79ea668e55e..008b6cf7a6d 100644 --- a/addons/mail/static/src/js/services/mail_window_manager.js +++ b/addons/mail/static/src/js/services/mail_window_manager.js @@ -532,9 +532,6 @@ MailManager.include({ * @private */ _repositionThreadWindows: function () { - if (this._areAllThreadWindowsHidden()) { - return; - } this._computeAvailableSlotsForThreadWindows(); this._repositionVisibleThreadWindows(); @@ -576,9 +573,6 @@ MailManager.include({ * the focus is on the thread window. */ _updateThreadWindowsFromMessage: function (message, options) { - if (this._areAllThreadWindowsHidden()) { - return; - } _.each(this._threadWindows, function (threadWindow) { if (_.contains(message.getThreadIDs(), threadWindow.getID())) { threadWindow.update(options);