[x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Expansion panels currently render with a flash of unstyled content (FOUC) when nested in a dialog -- they always temporarily appear as expanded, regardless of what the "expanded" attribute is set to. After a moment, all expansion panels that have been explicitly set to closed collapse.
This only occurs in Angular / Material 7.
Expansion panels should appear as collapsed when the dialog opens when expanded=false
instead of briefly appearing as expanded, then collapsing after a delay.
Click the button and note the flash of unstyled content in the dialog in Angular 7.
Angular 7 (bugged): https://angular-egzwfw.stackblitz.io
Angular 6 (correct): https://angular-eepzxs.stackblitz.io
Flashes of unstyled content are jarring and feel very buggy.
Angular version: 7.0.1
Material version: 7.0.2
TypeScript: 3.1.1
Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x] Firefox version XX
- [x] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
Might potentially be solved by https://github.com/angular/material2/pull/11778.
I tried it out and it doesn't look like it'll be fixed by #11778.
Reopening as the fix was reverted.
This seems to be a larger issue across our library as our components use animations to set state quite frequently.
@josephperrott I've opened https://github.com/angular/material2/pull/14127 which should fix the issue and avoid the presubmit issues.
@crisbeto @josephperrott Hate to be that guy, but has there been any traction on this issue since November? Looks like it might be blocked by a larger issue, per comments in the PR?
Hope this issue gets the attention it deserves. definitely shouldn't be a "P4" priority.
this is probably one of the top reasons to stay with 6.4.7.
Hi guys,
It's a workaround but you can use the lazy rendering of the expansion panel to prevent the animation ( with ng-template matExpansionPanelContent).
@crisbeto @josephperrott, Is there a timeline for this fix being worked into a release? Asking so we know whether to move forward with workarounds or reworks.
hello! is there an ETA on this?
Write this following code you may solve this issue
ngOnInit() {
this.href = this.router.url;
console.log(this.href);
}
[expanded]="[this.href === 'routelink']"
As per #11765, there is a workaround styling expansion panels when being animated. Maybe it has something to do the way of inserting the dynamic content inside dialogs using components that uses Material components in them. If you use regular HTML content like paragraphs or anything else, everything works fine.
I don't know if it is related to how the content is loaded, the load speed or the styles. Even if these styles fixes the problem "temporarily", there must be a solution somewhere.
If I have different material accordions stylings that I use for multiple dialog components and non-dialog components at the same time, It will be hard to global styling.
I really like how Angular works this way of defining components, having content separately... But we also need speed. Users do not like to wait like 477ms (like in my case) to open a Dialog with 7 components and a tab that separates those components in sections. It is kinda slow IMHO.
I hope this will be solved soon.
Also waiting for it to be solved.
Facing the same issue. Any leads ?
Another workaround is to disable all animations until ngAfterViewInit
using the [@.disabled]
property on a parent element.
@dcrouch79 This workaround works nicely until official fix. Cheers!
Another workaround is to disable all animations until
ngAfterViewInit
using the[@.disabled]
property on a parent element.
@dcrouch79 your stackblitz link is broken D:
@EzyBakeOven I accidentally deleted it! I've created a new one with a more obvious name this time. The original link has been updated.
Has there been any update for an official fix for this? I'm also having the same issue.
Another workaround is to disable all animations until
ngAfterViewInit
using the[@.disabled]
property on a parent element.
Greate solution. Thanks!
Another workaround is to disable all animations until
ngAfterViewInit
using the[@.disabled]
property on a parent element.
best solution on here!
Problem still persists in v9.1.0
https://stackblitz.com/edit/angular-issue13870-workaround-ytbs1x
Another workaround is to disable all animations until
ngAfterViewInit
using the[@.disabled]
property on a parent element.
thanks alot!
Still persist on Angular Material 10.0.1
Still persist with Angular Material 11.0.x
The skackblitz links in the issue are not opening. Here is mine for Angular v11 https://stackblitz.com/edit/components-issue-1fvgvm
I'm still having this issue as well with Angular Material 11
Another workaround is to disable all animations until
ngAfterViewInit
using the[@.disabled]
property on a parent element.
Thanks alot. You Saved the Day.
I think the problem is inside dialog itself, because I noticed that all content is jumping when dialog is opening. To reproduce that you can open any dialog in angular material dialog example page. The content jumps a little. We have separated dialog header and footer (actions) and now content jumping became very noticeable. At first thought that there is a bug in our project, but then decided to check the material dialog example page.
Open this stackblitz:
https://stackblitz.com/angular/rogvlbmonba?file=src%2Fapp%2Fdialog-overview-example.ts
And now open dialog. You will notice how buttons are jumping a little. If you cannot - enable CPU throttling in devtools.
Same thing happens with an expansion panel inside a mat-menu .. problem still persists
Most helpful comment
Another workaround is to disable all animations until
ngAfterViewInit
using the[@.disabled]
property on a parent element.https://stackblitz.com/edit/angular-issue13870-workaround