Skip to content

Commit

Permalink
fix(modal): remove window class after animation
Browse files Browse the repository at this point in the history
Modal dialog removeAfterAnimate switched to wait until after all animations are finished to call the done callback

Fixes angular-ui#6051
  • Loading branch information
Anthony Cleaver committed Jun 27, 2016
1 parent ed3400b commit 9f1e9ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,16 +375,17 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.p
afterAnimating.done = true;

$animate.leave(domEl).then(function() {
if (done) {
done();
}

domEl.remove();
if (closedDeferred) {
closedDeferred.resolve();
}
});

scope.$destroy();
if (done) {
done();
}
}
}

Expand Down

0 comments on commit 9f1e9ca

Please sign in to comment.