Modal Dialog doesn't fade out
Under certain circumstances, the modal dialog will simply disappear instead of fading out (even though it successfully fades in).
The example in the documentation is what it should do (fade in and out). https://angular-ui.github.io/bootstrap/#/modal
Ironically, the plunker link it generates shows the modal not properly fading out. I've saved my own to serve as an example here: http://plnkr.co/edit/lmFTpQtfgV6qB4AuFrXj?p=preview [Edit from @chrisirhc to reduce confusion: Please take note that the above Plunker does not include angular-animate. As such, no animations should be seen. This is a new requirement for animations, see README.]
I have the same issue in a separate project of mine where I am handling the modal differently but have the same bug. I can provide the 2nd example if it would help but I imagine the plunker should be enough.
The bug appears to be browser independent as it occurs both when I use Chrome v42.0.2311.135 m and in the developer edition of Firefox (39.0a2).
UPDATE: Note that the plnkr is using the latest version of angular-ui (0.13.0) and the latest supported version of angular (1.3.13). This is not about angular 1.4.
Is this on version 0.13.0?
Yes
+1 I can also confirm this issue.
Related: #3620. Check out the discussion there about ngAnimate changes in AngularJS 1.3 causing this behavior.
also conforming the same issue with 0.13.0 + angular 1.4
Does anyone have a workaround for this bug? I really need to have it fixed by next week.
+1
+1
@jondthompson you can set animation to false so it works while fixes.
Like I said did anyone here confirm everything is working as its supposed to when you include ngAnimate?
@rvanbaalen With ngAnimate 1.40 rc.2 the modal close successfully, but the animation effect (fade out / in) won't work.
Please test with versions that we actually support. UI Bootstrap supports Angular 1.3 so you should test with Angular 1.3 and ngAnimate 1.3
@rvanbaalen UI Bootstrap with Angular 1.3 and ngAnimate 1.3 working fine :)
Thats what I mean. Everything else will be addressed soon when we implement Angular 1.4 compatibility (when the stable release is out).
Hope this can help you, seems to be related to:
domEl.one('$animate:close', function closeFn() {
$rootScope.$evalAsync(afterAnimating);
});
Seems that $animate:close is not triggered with Angular 1.4
Comments from #3620
There is a known issue with Angular 1.4 and the Modal/Carousel directives. The ngAnimate module had some significant changes documented here that breaks how those directives are chaining animations. The area that needs to be addressed in the modal is here. . As a workaround, I changed that line from:
domEl.one('$animate:close', function closeFn() {
$rootScope.$evalAsync(afterAnimating);
}
To:
$rootScope.$evalAsync(afterAnimating);
Keep in mind, you lose the closing animation.
Using 0.13.0 with angular 1.4 rc2, the modal dialog doesn't even appear for me. Just the dimmed backdrop. Switched back to 0.12.1 and everything is fine again.
Yay, I think angular 1.4.0 was released tonight :). When I close a dialog, the dialog disappears but the backdrop is still there.
@SlippySken I don't see the release on the official website, it is still on RC2. However, you can fix the issue as @RobJacobs mention. I did it in my code, and it is working now
I was looking at https://github.com/angular/angular.js/releases. It seems that the official website isn't updated yet. But the workaround is working :). Thanks :)