Skip to content
Permalink
Browse files

fix(animation): animations of duration 0 now run in Safari (#19287)

fixes #19285
  • Loading branch information...
liamdebeasi committed Sep 10, 2019
1 parent a3f345c commit 4e544f1d904573734c0f25ca9df4ad757ffdd075
Showing with 9 additions and 0 deletions.
  1. +9 −0 core/src/utils/animation/animation.ts
@@ -410,6 +410,15 @@ export const createAnimation = () => {
* to complete one cycle.
*/
const duration = (animationDuration: number) => {
/**
* CSS Animation Durations of 0ms work fine on Chrome
* but do not run on Safari, so force it to 1ms to
* get it to run on both platforms.
*/
if (!supportsWebAnimations && animationDuration === 0) {
animationDuration = 1;
}

_duration = animationDuration;

update(true);

0 comments on commit 4e544f1

Please sign in to comment.
You can’t perform that action at this time.