Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Modal element is not removed if using animateProvider.classNameFilter #3647

Closed
equiet opened this issue May 8, 2015 · 15 comments
Closed

Modal element is not removed if using animateProvider.classNameFilter #3647

equiet opened this issue May 8, 2015 · 15 comments

Comments

@equiet
Copy link

equiet commented May 8, 2015

If there is a $animateProvider.classNameFilter(/whitelistedelement/) then https://github.com/angular-ui/bootstrap/blob/master/src/modal/modal.js#L231 is never run (looks like the event is never triggered). As a result, the modal window is faded out, but never removed from the dom. It stays in the foreground with 0 opacity so that nothing on the page can be clicked.

Here's a plunk: http://plnkr.co/edit/hPMd9R2jsRzSivVxTUNg?p=preview
As you can see, you can open and close the modal only once.

This problem appeared in 0.13. It was working in 0.12 and 0.11. Not sure why, though.

Temporary fix: use $animateProvider.classNameFilter(/whitelistedelement|modal/).

@chrisirhc chrisirhc added this to the 0.13.1 (Performance) milestone May 8, 2015
@chrisirhc
Copy link
Contributor

Thank you for reporting this. I was afraid I missed something. This will be fixed soon

@shawn-simon
Copy link

Is there a workaround for this for now? (besides animation: false on the $modal.open)

@germanger
Copy link

+1

@germanger
Copy link

With angular 1.4.0 this is not working anymore!

     angular.module('myApp').config(['$animateProvider', function($animateProvider){
           $animateProvider.classNameFilter(/modal/);
     }]);

@rvanbaalen
Copy link
Contributor

@germanger FYI; As of this moment, a stable release of Angular 1.4 hasn't been released yet and thus UI Bootstrap doesn't support use of Angular 1.4 yet.

@hoeni
Copy link

hoeni commented Jun 1, 2015

+1 (with Angular 1.4)

@char0n
Copy link

char0n commented Jun 1, 2015

The only workaround for angular 1.4 that I could find, is to set animation: false when creating new dialog.

Or use $modalProvider.options.animation = false;

@germanger
Copy link

Is it possible to set that ($modalProvider.options.animation = false;) via config and not in every modal?

@philBrown
Copy link
Contributor

@rvanbaalen you're wrong about the official Angular 1.4 release. It was tagged 6 days ago (one day prior to your comment) ~ https://github.com/angular/angular.js/releases/tag/v1.4.0

@char0n
Copy link

char0n commented Jun 2, 2015

@germanger yes it is:

$modal.open({
animate: true|false
});

@rvanbaalen
Copy link
Contributor

@philBrown ah well.. Cant always be right 😉 thanks for correcting me.

@chrisirhc
Copy link
Contributor

Resolved in #3895

Working Plunker: http://plnkr.co/edit/4gMUSzeLv65atc0flHFx?p=preview

@chrisirhc chrisirhc self-assigned this Jul 4, 2015
@Sjors
Copy link

Sjors commented Jul 7, 2015

@char0n actually it's animation, not animate:

$modal.open({
   animation: true|false
});

Not very consistent though; the ui.bootstrap.progressbar does use animate.

@char0n
Copy link

char0n commented Jul 7, 2015

Yep, thanks for correcting me.

On Tue, Jul 7, 2015 at 1:15 PM, Sjors Provoost [email protected]
wrote:

@char0n https://github.com/char0n actually it's animation, not animate:

$modal.open({
animation: true|false
});

Not very consistent though; the ui.bootstrap.progressbar does use animate.


Reply to this email directly or view it on GitHub
#3647 (comment)
.

Vladimír Gorej | CodeScale s.r.o.
email: [email protected]
tel: +420 777 861 279, +421 948 023 011
web: http://www.codescale.net

@wesleycho wesleycho modified the milestones: 0.13.1 (npm), 0.13.2 (Performance) Jul 23, 2015
@wesleycho wesleycho modified the milestones: 0.13.2 (1.4 support), 0.13.3 (Performance) Aug 2, 2015
@wesleycho wesleycho modified the milestones: 0.13.3 (Performance), 0.13.2 (1.4 support) Aug 2, 2015
@wesleycho
Copy link
Contributor

This looks like it has been fixed according to #3895 - closing as resolved.

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

No branches or pull requests

10 participants