Skip to content

Commit

Permalink
[FIX] mail: chat window positioning with discuss open
Browse files Browse the repository at this point in the history
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 #30137
  • Loading branch information
alexkuhn committed Jan 11, 2019
1 parent 2ce4ccd commit 295a654
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions addons/mail/static/src/js/services/mail_window_manager.js
Expand Up @@ -532,9 +532,6 @@ MailManager.include({
* @private
*/
_repositionThreadWindows: function () {
if (this._areAllThreadWindowsHidden()) {
return;
}
this._computeAvailableSlotsForThreadWindows();

this._repositionVisibleThreadWindows();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 295a654

Please sign in to comment.