简体   繁体   English

iOS6中未删除Angular 1.2.5动画类

[英]Angular 1.2.5 animation classes are not removed in iOS6

I have an animation, where the box slides up and down. 我有一个动画,框在其中上下滑动。 It works on web, ios and android phonegap app and mobile safari (All I tested). 它可以在网络,ios和android phonegap应用程序以及移动Safari(我测试过)中使用。 It also works on iPhone5 iOS6, but I have problems because supporting classes, such as ng-hide-add, ng-hide-remove are not deleted after the animation completes. 它也可以在iPhone5 iOS6上运行,但是我遇到了问题,因为动画完成后,支持类(例如ng-hide-add,ng-hide-remove)没有删除。 Does anyone eperienced similar issues? 有没有人遇到过类似的问题?

EDIT: it basically appears that animation doesn't work on iOS6. 编辑:基本上,动画似乎在iOS6上不起作用。 Classes are added, but never removed. 类已添加,但从未删除。

UPDATE: the issue seems to happen when the animation time is less then 0.5s 更新:动画时间少于0.5s时似乎会发生此问题

I did some tests and it looks that something in my application caused animation classes on iOS6 to be sticky if the animation is under 0.5 seconds. 我进行了一些测试,结果发现如果动画在0.5秒以下,应用程序中的某些内容会使iOS6上的动画类发粘。 I was able to solve the issue in a hacky way, by deleting the classes manually upon the animation complete event. 通过在完成动画事件时手动删除类,我能够以一种怪诞的方式解决该问题。

if(ios6) {
    $('.element').on('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function() {
        $('.element').removeClass("ng-animate ng-hide-add ng-animate-start ng-animate-active ng-hide-add-active ng-hide-remove ng-hide-remove-active");
    });
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM