BabylonJS / Editor

Community managed visual editor for Babylon.js
http://editor.babylonjs.com/
812 stars 232 forks source link

MacOS bug when loading #431

Closed seacloud9 closed 11 months ago

seacloud9 commented 12 months ago

It looks like this commit introduced this bug on macOS:

https://github.com/BabylonJS/Editor/assets/640305/ca492698-876f-4bfd-b069-ee289f163e02

https://github.com/BabylonJS/Editor/blob/533786c70251bba4db3bc4a1b89e15aa31a4e042/src/preloaders/editor.ts

window.addEventListener("DOMContentLoaded", async () => {
    await Tools.Wait(100); // this appears to be needed for macOS 

    const htmlFile = basename(window.location.href);

    if (htmlFile === "editor.html") {
        return runEditor();
    }

    if (htmlFile === "play.html") {
        return runIsolatedPlay();
    }
});
julien-moreau commented 11 months ago

Closing this issue as we are discussing on the PR