From 05c1ad885be8d11b6334cb7ad46d73e50b107fe1 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Fri, 18 Oct 2024 22:12:04 +0530 Subject: [PATCH] fix: Embed - Do not reuse the modal on reopening it. (#17171) * chore: increase pagination managed users endpoint (#17147) * Dont reuse the existing modal --------- Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com> --- packages/embeds/embed-core/src/embed.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/embeds/embed-core/src/embed.ts b/packages/embeds/embed-core/src/embed.ts index 99210b962e..ec5e3bb589 100644 --- a/packages/embeds/embed-core/src/embed.ts +++ b/packages/embeds/embed-core/src/embed.ts @@ -690,7 +690,10 @@ class CalApi { if (__prerender) { this.preloadedModalUid = uid; } else { - this.modalUid = uid; + // Intentionally not setting it to have the behaviour of reusing the same modal. Because it causes outdated content that might not be valid based on + // 1. The time difference b/w reopening(availability getting changed in b/w) + // 2. User using different query params but they not being used because of the same modal being reused. Happens in case of headless router being opened in embed + // this.modalUid = uid; } if (typeof config.iframeAttrs === "string" || config.iframeAttrs instanceof Array) {