Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal's entry animations are missing in Angular production build #3952

Closed
peruukki opened this issue Jan 15, 2021 · 3 comments · Fixed by #3962
Closed

Modal's entry animations are missing in Angular production build #3952

peruukki opened this issue Jan 15, 2021 · 3 comments · Fixed by #3962

Comments

@peruukki
Copy link
Contributor

Bug description:

I noticed that the modals are missing their entry animations (the downwards movement) when running the production build of an Angular 11 application:

animation-missing

The animation works correctly when running the development server:

animation-works

Also, the exit animation (upwards movement) works in both cases.

Link to minimally-working StackBlitz that reproduces the issue:

I can only reproduce the problem with Angular's production build, which StackBlitz doesn't support as far as I know. But I created a minimal example repository that contains ng-bootstrap's modal demo page, and where the problem can be reproduced: https://github.com/peruukki/ng-bootstrap-modal-example.

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 11.0.9

ng-bootstrap: 9.0.0

Bootstrap: 4.5.3

@peruukki peruukki changed the title Modal's entry animation is missing in Angular 11 production build Modal's entry animation is missing in Angular production build Jan 15, 2021
@peruukki peruukki changed the title Modal's entry animation is missing in Angular production build Modal's entry animations are missing in Angular production build Jan 15, 2021
@maxokorokov maxokorokov added this to the 9.0.1 milestone Jan 18, 2021
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Jan 20, 2021
Replace a generic `reflow()` call in `ngbRunTransition`:
- introduce granular per-component reflows only when necessary
- take into account `animation` flag for reflows

Fixes ng-bootstrap#3954
Fixes ng-bootstrap#3952
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Jan 20, 2021
Replace a generic `reflow()` call in `ngbRunTransition`:
- introduce granular per-component reflows only when necessary
- take into account `animation` flag for reflows

Fixes ng-bootstrap#3954
Fixes ng-bootstrap#3952
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue Jan 20, 2021
Replace a generic `reflow()` call in `ngbRunTransition`:
- introduce granular per-component reflows only when necessary
- take into account `animation` flag for reflows

Fixes ng-bootstrap#3954
Fixes ng-bootstrap#3952
maxokorokov added a commit that referenced this issue Jan 20, 2021
Replace a generic `reflow()` call in `ngbRunTransition`:
- introduce granular per-component reflows only when necessary
- take into account `animation` flag for reflows

Fixes #3954
Fixes #3952
maxokorokov added a commit that referenced this issue Jan 21, 2021
Replace a generic `reflow()` call in `ngbRunTransition`:
- introduce granular per-component reflows only when necessary
- take into account `animation` flag for reflows

Fixes #3954
Fixes #3952

(cherry picked from commit ad3c9c3)
@maxokorokov
Copy link
Member

Fixed in 8.0.3 and 9.0.1

@4javier
Copy link

4javier commented Jan 26, 2021

Same problem with ngbCollapse on ng-bootstrap 9.0.2 and Angular 11.1: no animation in prod build.

@maxokorokov
Copy link
Member

@4javier, please open a separate issue for this filling the template and providing a reproduction scenario.
Demo site is built in production and animations are there → https://ng-bootstrap.github.io/#/components/collapse/examples#basic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment