From f3e53af1f7e6a78a302a2a5f88ab3e898e92eac6 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 16 Jun 2021 20:33:31 +0800 Subject: fix: Real fix #624. --- FrontEnd/src/utilities/refreshAnimation.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 FrontEnd/src/utilities/refreshAnimation.ts (limited to 'FrontEnd/src/utilities') diff --git a/FrontEnd/src/utilities/refreshAnimation.ts b/FrontEnd/src/utilities/refreshAnimation.ts new file mode 100644 index 00000000..ba501107 --- /dev/null +++ b/FrontEnd/src/utilities/refreshAnimation.ts @@ -0,0 +1,13 @@ +export default function refreshAnimation(): void { + document.body.querySelectorAll("*").forEach((e) => { + if (e instanceof HTMLElement) { + const an = getComputedStyle(e).animationName; + if (an !== "none") { + e.style.animationName = "none"; + setTimeout(() => { + e.style.animationName = an; + }); + } + } + }); +} -- cgit v1.2.3