From 7334d59c4fd259e90f18a833b33795c34d8f9813 Mon Sep 17 00:00:00 2001 From: Alexis Faizeau Date: Mon, 7 Feb 2022 18:41:24 +0100 Subject: [PATCH] Remove priority on iframe add to cowebsites --- front/src/WebRtc/CoWebsiteManager.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index 4d6f482c..476526da 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -618,6 +618,10 @@ class CoWebsiteManager { closable?: boolean, jitsi?: boolean ): CoWebsite { + if (get(coWebsitesNotAsleep).length < 1) { + this.loadMain(widthPercent); + } + iframe.id = this.generateUniqueId(); const newCoWebsite: CoWebsite = { @@ -631,12 +635,6 @@ class CoWebsiteManager { jitsi, }; - if (get(coWebsitesNotAsleep).length < 1) { - coWebsites.remove(newCoWebsite); - coWebsites.add(newCoWebsite, 0); - this.loadMain(widthPercent); - } - if (position === 0) { this.openMain(); setTimeout(() => {