From c23c97d303d227f6a0e2b3c775189f90772c1dfa Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 9 Feb 2024 16:25:58 +0900 Subject: [PATCH] =?UTF-8?q?perf(frontend):=20splash=20screen=E3=81=AEdom?= =?UTF-8?q?=E3=81=8C=E6=B6=88=E3=81=88=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/misskey-dev/misskey/issues/10805 --- packages/frontend/src/boot/common.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index fd5a03a70d..295585af57 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -60,12 +60,6 @@ export async function common(createVue: () => App) { }); } - const splash = document.getElementById('splash'); - // 念のためnullチェック(HTMLが古い場合があるため(そのうち消す)) - if (splash) splash.addEventListener('transitionend', () => { - splash.remove(); - }); - let isClientUpdated = false; //#region クライアントが更新されたかチェック @@ -289,5 +283,10 @@ function removeSplash() { if (splash) { splash.style.opacity = '0'; splash.style.pointerEvents = 'none'; + + // transitionendイベントが発火しない場合があるため + window.setTimeout(() => { + splash.remove(); + }, 1000); } }