Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngIf with ngAnimate adds ng-enter class too late in Safari 9.0.1 #13386

@eXaminator

Description

@eXaminator

Hi,

I just stumbled across a strange behavior in ngAnimate.

I have build a very simple "collapsible" which removes an element via ng-if and animates its max-height on enter and leave. This works as expected unless I also add an ng-class to a parent which sets the is-open class when the collapsible was opened which also has an animation.

When viewing the plunker in Safari (I have 9.0.1) you will see a very short "flicker". It seems that ng-if
appends the DOM element before the class is set.

Here is a short gif where you can see the problem. When clicking the toggle button it will shortly show the element at full height before collapsing it to max-height: 0 (as per the ng-enter class) and then it starts growing again with the animation.

flicker

As soon as you remove the ng-class the flicker problem is resolved. This problem doesn't seem to occur in other browsers (at least not in chrome).

http://plnkr.co/edit/yrebsEs80kPaS90rk0oE

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions