Skip to content

Commit 2d39c07

Browse files
authored
fix(animation): fallback to CSS Animations on older versions of Chrome (ionic-team#19288)
fixes ionic-team#19272
1 parent 4e544f1 commit 2d39c07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/utils/animation/animation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export const createAnimation = () => {
4242
const _afterAddReadFunctions: any[] = [];
4343
const _afterAddWriteFunctions: any[] = [];
4444
const webAnimations: any[] = [];
45-
const supportsWebAnimations = (typeof (Element as any) === 'function') && (typeof (Element as any).prototype!.animate === 'function');
45+
const supportsAnimationEffect = (typeof (AnimationEffect as any) === 'function' || typeof (window as any).AnimationEffect === 'function');
46+
const supportsWebAnimations = (typeof (Element as any) === 'function') && (typeof (Element as any).prototype!.animate === 'function') && supportsAnimationEffect;
4647
const ANIMATION_END_FALLBACK_PADDING_MS = 100;
4748

4849
/**

0 commit comments

Comments
 (0)