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

Fix for #12266 : Fixed skipping/cleaning of elements pending animations. #12277

Closed
wants to merge 1 commit into from
Closed

Conversation

sreeramu
Copy link
Contributor

@sreeramu sreeramu commented Jul 6, 2015

Instead of merging existing animation option to new animation options we can merge in reverse and utilize old animation runner.

This PR will fix #12266,#12007 issue.

Example to test:

var app = angular.module("app", ['ngAnimate']);

app.directive('iholder', ['$animate','$timeout', function($animate,$timeout) {
    return {
        restrict: 'EA',
        scope: {},
        template: '<div ng-click="clickHandler()" style="width:100%;height:10em;background-color:red;"></div>',
        replace: true,
        link: function($scope, element, attrs) {
            $scope.clickHandler = function() {
                $animate.addClass(element,'test1');
                $animate.removeClass(element,'test1');
                $animate.addClass(element,'test1');
                $animate.removeClass(element,'test1');
            }
        }
    }
}]);

@sreeramu sreeramu changed the title Fix for #12266 Fix for #12266 : Fixed skipping/cleaning of elements pending animations. Jul 6, 2015
@Narretz Narretz added this to the 1.4.x milestone Jul 6, 2015
@Narretz
Copy link
Contributor

Narretz commented Jul 6, 2015

Hi, thanks for the PR. Would it be possible for you to add a test for this?

@sreeramu
Copy link
Contributor Author

sreeramu commented Jul 8, 2015

@Narretz Test script are updated for this bug.

@matsko
Copy link
Contributor

matsko commented Jul 15, 2015

@sreeramu great work. Could you squash everything together into a single commit and place a commit message that is something like:

fix($animate): ensure that class-based animations are properly applied when cancelled

@matsko
Copy link
Contributor

matsko commented Jul 17, 2015

@sreeramu if you're unable to get to this I could squash everything together and create a commit message for you.

…d when cancelled

Instead of merging existing animation option to new animation options we can merge in reverse and utilize old animation runner.
@sreeramu
Copy link
Contributor Author

@matsko Thank You, i had squash my commits.

@matsko
Copy link
Contributor

matsko commented Jul 17, 2015

Landed as 21d6db3. Excellent work @sreeramu. Than you :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ngAnimate messing with validation classes
4 participants