Browse files

[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.

  • Loading branch information...
alexkuhn committed Jan 11, 2019
1 parent ba925fb commit d9cd3fcac07011495417a355ebbafef07dd87577
Showing with 0 additions and 6 deletions.
  1. +0 −6 addons/mail/static/src/js/services/mail_window_manager.js
@@ -532,9 +532,6 @@ MailManager.include({
* @private
_repositionThreadWindows: function () {
if (this._areAllThreadWindowsHidden()) {

@@ -576,9 +573,6 @@ MailManager.include({
* the focus is on the thread window.
_updateThreadWindowsFromMessage: function (message, options) {
if (this._areAllThreadWindowsHidden()) {
_.each(this._threadWindows, function (threadWindow) {
if (_.contains(message.getThreadIDs(), threadWindow.getID())) {

0 comments on commit d9cd3fc

Please sign in to comment.