Skip to content

Commit 9f1e9ca

Browse files
author
Anthony Cleaver
committed
fix(modal): remove window class after animation
Modal dialog removeAfterAnimate switched to wait until after all animations are finished to call the done callback Fixes angular-ui#6051
1 parent ed3400b commit 9f1e9ca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/modal/modal.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -375,16 +375,17 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.p
375375
afterAnimating.done = true;
376376

377377
$animate.leave(domEl).then(function() {
378+
if (done) {
379+
done();
380+
}
381+
378382
domEl.remove();
379383
if (closedDeferred) {
380384
closedDeferred.resolve();
381385
}
382386
});
383387

384388
scope.$destroy();
385-
if (done) {
386-
done();
387-
}
388389
}
389390
}
390391

0 commit comments

Comments
 (0)