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

Mat-expansion panel is opened while been animated #16534

Closed
frct1 opened this issue Jul 16, 2019 · 7 comments · Fixed by #30119
Closed

Mat-expansion panel is opened while been animated #16534

frct1 opened this issue Jul 16, 2019 · 7 comments · Fixed by #30119
Assignees
Labels
area: material/expansion P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@frct1
Copy link

frct1 commented Jul 16, 2019

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue

Steps to reproduce:

  1. Add enter animation to mat-accordion
  2. https://components-issue-wabdrn.stackblitz.io

Expected Behavior

While user see animation of entering mat-accordion: content of mat-expansion-panel should be hidden = panel should be closed.

Actual Behavior

Content of mat-expansion panel is opened in animation. After animation completed it's closing...

Environment

  • Angular: 8.0.0 (same with 8.1.0)
  • CDK/Material:
  • Browser(s): Chrome 75
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@andrewseguin
Copy link
Contributor

Root cause seems to be due to Angular's priority of executing parent animations before children animations, which means the expansion panel waits to set itself up. It makes sense to me to do a better job of initializing the expansion panel outside of animations to avoid this.

@andrewseguin andrewseguin added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jul 17, 2019
@frct1
Copy link
Author

frct1 commented Jul 17, 2019

Hello there
Thank you for the answer. I will glad to see it fixed in next updates ;)

@meblum
Copy link

meblum commented Jul 13, 2020

Same issue, having an expansion panel in a mat-dialog. When opening the dialog the expansion opens first and then closes.

@meblum
Copy link

meblum commented Jul 13, 2020

Possible duplicate of #11765

@brankoEISI
Copy link

Same here.

@meblum
Copy link

meblum commented Jul 22, 2020

Here’s an easy workaround that solved it for me #11765 (comment)

Add the css rules globally so it fixes the entire app.

@crisbeto crisbeto self-assigned this Dec 5, 2024
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 5, 2024
Reworks the expansion panel to animate purely with CSS, rather than going through the `@angular/animations` module. This simplifies the setup and allows us to resolve several long-standing bug reports.

Fixes angular#27946.
Fixes angular#22715.
Fixes angular#21434.
Fixes angular#20610.
Fixes angular#20517.
Fixes angular#17177.
Fixes angular#16534.
Fixes angular#16503.
Fixes angular#14952.
Fixes angular#14759.
Fixes angular#14075.
Fixes angular#11765.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 5, 2024
Reworks the expansion panel to animate purely with CSS, rather than going through the `@angular/animations` module. This simplifies the setup and allows us to resolve several long-standing bug reports.

Fixes angular#27946.
Fixes angular#22715.
Fixes angular#21434.
Fixes angular#20517.
Fixes angular#17177.
Fixes angular#16534.
Fixes angular#16503.
Fixes angular#14952.
Fixes angular#14759.
Fixes angular#14075.
Fixes angular#11765.
crisbeto added a commit that referenced this issue Dec 5, 2024
Reworks the expansion panel to animate purely with CSS, rather than going through the `@angular/animations` module. This simplifies the setup and allows us to resolve several long-standing bug reports.

Fixes #27946.
Fixes #22715.
Fixes #21434.
Fixes #20517.
Fixes #17177.
Fixes #16534.
Fixes #16503.
Fixes #14952.
Fixes #14759.
Fixes #14075.
Fixes #11765.

(cherry picked from commit aafa151)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/expansion P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants