From 2d39c07fec660a50c8794391d1e88603c9b67213 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 10 Sep 2019 11:32:40 -0400 Subject: [PATCH] fix(animation): fallback to CSS Animations on older versions of Chrome (#19288) fixes #19272 --- core/src/utils/animation/animation.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/utils/animation/animation.ts b/core/src/utils/animation/animation.ts index 68ab2c6c6b..dc4c99d499 100644 --- a/core/src/utils/animation/animation.ts +++ b/core/src/utils/animation/animation.ts @@ -42,7 +42,8 @@ export const createAnimation = () => { const _afterAddReadFunctions: any[] = []; const _afterAddWriteFunctions: any[] = []; const webAnimations: any[] = []; - const supportsWebAnimations = (typeof (Element as any) === 'function') && (typeof (Element as any).prototype!.animate === 'function'); + const supportsAnimationEffect = (typeof (AnimationEffect as any) === 'function' || typeof (window as any).AnimationEffect === 'function'); + const supportsWebAnimations = (typeof (Element as any) === 'function') && (typeof (Element as any).prototype!.animate === 'function') && supportsAnimationEffect; const ANIMATION_END_FALLBACK_PADDING_MS = 100; /**