-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(expansion-panel): emitting events twice on some browsers #13600
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
fix(expansion-panel): emitting events twice on some browsers #13600
Conversation
Fixes the expansion panel emitting the `afterExpand` and `afterCollapse` events twice on IE and Edge due to a bug in `@angular/animations`.
Along the same lines as angular#13600 and angular#13587. The `animationDone` will be emitted twice in a row for some browsers due to a bug in `@angular/animations`.
this._bodyAnimationDone.pipe(distinctUntilChanged((x, y) => { | ||
return x.fromState === y.fromState && x.toState === y.toState; | ||
})).subscribe(event => { | ||
if (event.fromState !== 'void') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing the _bodyAnimation
method, can we call it here since an upstream fix to this from angular/angular will likely have us essentially reverting this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind re-adding, but I don't see why it's an issue, considering that it's a private API. Once the upstream fix gets merged, we can turn it back into a private method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, its fine to leave it as is. I just wanted us to consider it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
this._bodyAnimationDone.pipe(distinctUntilChanged((x, y) => { | ||
return x.fromState === y.fromState && x.toState === y.toState; | ||
})).subscribe(event => { | ||
if (event.fromState !== 'void') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, its fine to leave it as is. I just wanted us to consider it.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes the expansion panel emitting the
afterExpand
andafterCollapse
events twice on IE and Edge due to a bug in@angular/animations
.