mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(animations): ensure all elements are cleaned up when calling .destroy() (#19654)
* fix race condition * remove zero
This commit is contained in:
@ -128,8 +128,10 @@ export const createAnimation = (): Animation => {
|
|||||||
|
|
||||||
webAnimations.length = 0;
|
webAnimations.length = 0;
|
||||||
} else {
|
} else {
|
||||||
|
const elementsArray = elements.slice();
|
||||||
|
|
||||||
raf(() => {
|
raf(() => {
|
||||||
elements.forEach(element => {
|
elementsArray.forEach(element => {
|
||||||
removeStyleProperty(element, 'animation-name');
|
removeStyleProperty(element, 'animation-name');
|
||||||
removeStyleProperty(element, 'animation-duration');
|
removeStyleProperty(element, 'animation-duration');
|
||||||
removeStyleProperty(element, 'animation-timing-function');
|
removeStyleProperty(element, 'animation-timing-function');
|
||||||
|
Reference in New Issue
Block a user