enforce visibility (#19639)

This commit is contained in:
Hariom Balhara
2025-03-01 15:53:20 +05:30
committed by GitHub
parent cbd8525c39
commit 610e6e8e88
@@ -14,6 +14,7 @@ const enum EMBED_IFRAME_STATE {
NOT_INITIALIZED,
INITIALIZED,
}
/**
* All types of config that are critical to be processed as soon as possible are provided as query params to the iframe
*/
@@ -333,7 +334,13 @@ export const useEmbedType = () => {
};
function unhideBody() {
document.body.style.visibility = "visible";
// Ensure that it stays visible and not reverted by React
runAsap(() => {
if (document.body.style.visibility !== "visible") {
document.body.style.visibility = "visible";
}
unhideBody();
});
}
// It is a map of methods that can be called by parent using doInIframe({method: "methodName", arg: "argument"})