FIX: Defer removing the splash screen until the window load event fires (#17225)
There's an obscure bug where really slow devices end up removing the splash screen before they're finished parsing all of the Discourse assets. This PR won't impact fast devices but should hopefully prevent the premature removal of the splash on super slow devices.
This commit is contained in:
parent
7b2ad1b931
commit
6a61e855b3
|
@ -82,9 +82,15 @@ const Discourse = Application.extend({
|
|||
});
|
||||
});
|
||||
|
||||
window.addEventListener(
|
||||
"load",
|
||||
() => {
|
||||
// The app booted. Remove the splash screen
|
||||
document.querySelector("#d-splash")?.remove();
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
},
|
||||
|
||||
_registerPluginCode(version, code) {
|
||||
_pluginCallbacks.push({ version, code });
|
||||
|
|
Loading…
Reference in New Issue