fix(excalidraw): send ready signal immediately (fix deadlock: iframe waited for init, parent waited for ready)
CI / lint (push) Failing after 10s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 14s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
CI / lint (push) Failing after 10s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 14s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
This commit is contained in:
@@ -134,6 +134,9 @@
|
|||||||
window.parent.postMessage(msg, "*");
|
window.parent.postMessage(msg, "*");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Signal that the iframe is loaded and ready to receive init data
|
||||||
|
sendToParent({ type: "ready" });
|
||||||
|
|
||||||
function markDirty() {
|
function markDirty() {
|
||||||
if (!isDirty) {
|
if (!isDirty) {
|
||||||
isDirty = true;
|
isDirty = true;
|
||||||
@@ -186,7 +189,6 @@
|
|||||||
if (api) {
|
if (api) {
|
||||||
excalidrawAPI = api;
|
excalidrawAPI = api;
|
||||||
loadingEl.classList.add("hidden");
|
loadingEl.classList.add("hidden");
|
||||||
sendToParent({ type: "ready" });
|
|
||||||
if (theme === "dark") {
|
if (theme === "dark") {
|
||||||
api.updateScene({ appState: { theme: "dark" } });
|
api.updateScene({ appState: { theme: "dark" } });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user