From 223187c6404c190512d980c845f6d91d646dbce8 Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty Date: Wed, 14 Oct 2020 11:09:29 -0400 Subject: [PATCH] fix(UI): Do not re-compute the container width when chat window is closed. Since the external API now sets preferredWidth/preferredHeight for resizing the large video, we don't need to add chat width to the computed window width when the chat window is closed. Fixes https://github.com/jitsi/jitsi-meet/issues/7889 --- modules/UI/videolayout/LargeVideoManager.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/UI/videolayout/LargeVideoManager.js b/modules/UI/videolayout/LargeVideoManager.js index c2629b4d1..7b1e8c892 100644 --- a/modules/UI/videolayout/LargeVideoManager.js +++ b/modules/UI/videolayout/LargeVideoManager.js @@ -356,17 +356,12 @@ export default class LargeVideoManager { let widthToUse = this.preferredWidth || window.innerWidth; const { isOpen } = APP.store.getState()['features/chat']; - /** - * If chat state is open, we re-compute the container width by subtracting the default width of - * the chat. We re-compute the width again after the chat window is closed. This is needed when - * custom styling is configured on the large video container through the iFrame API. - */ - if (isOpen && !this.resizedForChat) { + if (isOpen) { + /** + * If chat state is open, we re-compute the container width + * by subtracting the default width of the chat. + */ widthToUse -= CHAT_SIZE; - this.resizedForChat = true; - } else if (this.resizedForChat) { - this.resizedForChat = false; - widthToUse += CHAT_SIZE; } this.width = widthToUse;