Hotfix: Avoid theme flicker in routing form embed. (#5067)

* Hotfix: metadata parsing

* Dont remove loader as theme switching can still occur in plain sight :(

Co-authored-by: zomars <zomars@me.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
pull/5068/head^2
Hariom Balhara 2022-10-18 17:17:06 +05:30 committed by GitHub
parent 4211ec1a82
commit 59ef4fe459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -247,7 +247,6 @@ export class Cal {
},
},
});
const isCalPageOptimized = calLink.includes("forms/");
config = config || {};
// Keeping auto-scroll disabled for two reasons:
// - If user scrolls the content to an appropriate position, it again resets it to default position which might not be for the liking of the user
@ -268,9 +267,7 @@ export class Cal {
throw new Error("Element not found");
}
const template = document.createElement("template");
template.innerHTML = `<cal-inline ${
isCalPageOptimized ? 'loading="done"' : ""
} style="max-height:inherit;height:inherit;min-height:inherit;display:flex;position:relative;flex-wrap:wrap;width:100%"></cal-inline>`;
template.innerHTML = `<cal-inline style="max-height:inherit;height:inherit;min-height:inherit;display:flex;position:relative;flex-wrap:wrap;width:100%"></cal-inline>`;
this.inlineEl = template.content.children[0];
(this.inlineEl as unknown as any).__CalAutoScroll = config.__autoScroll;
this.inlineEl.appendChild(iframe);