From bee6a870b2975e9a458f9cc1d07c54c02c35c858 Mon Sep 17 00:00:00 2001 From: Xavier Mouton-Dubosc Date: Fri, 9 Apr 2021 10:36:37 +0200 Subject: [PATCH] Incorrect loading state at start, due to missing Safari implementations Glitches on Safari iOS #138 --- src/element_cpu.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/element_cpu.js b/src/element_cpu.js index 6c9a7402..3abb2d90 100644 --- a/src/element_cpu.js +++ b/src/element_cpu.js @@ -257,8 +257,12 @@ export class CPU_element_api { if (this.act_was === act) { return; } - if ( (! document.CPU.hadPlayed) && (this.act_was !== null) && (act === 'loading') ){ - return; + if ( (! document.CPU.hadPlayed) && (act === 'loading') ){ + if (this.act_was !== null) { + return; + } + // correction for iOS, stuck in "loading" state at the beginning, see #138 + act = 'glow'; } let classes = this.container.classList; classes.remove(