Skip to content

Commit

Permalink
Incorrect loading state at start, due to missing Safari implementations
Browse files Browse the repository at this point in the history
Glitches on Safari iOS #138
  • Loading branch information
dascritch committed Apr 9, 2021
1 parent 90e9a15 commit bee6a87
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/element_cpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit bee6a87

Please sign in to comment.