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(overlay): backdrop exit animation not working #10145
fix(overlay): backdrop exit animation not working #10145
Conversation
src/cdk/overlay/overlay-ref.ts
Outdated
// In this case we make it unclickable and we try to remove it after a delay. | ||
backdropToDetach.style.pointerEvents = 'none'; | ||
backdropToDetach.classList.remove('cdk-overlay-backdrop-showing'); | ||
backdropToDetach.addEventListener('transitionend', finishDetach); |
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 just noticed that we should also attach this listener outside the zone.
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.
Done.
948ec46
to
d9bb7ff
Compare
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
d9bb7ff
to
6741617
Compare
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
6741617
to
f86072d
Compare
@crisbeto Please rebase when you have a chance |
f86072d
to
2ce3232
Compare
Rebased. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Fixes the transition when closing an overlay with an opaque backdrop appearing broken. The issue comes the fact that when we start animating the backdrop out, we also remove the `backdropClass` which makes the backdrop transparent. We don't need to remove the class, because we'll remove the backdrop from the DOM and clear the reference once the transition is done.
2ce3232
to
c2d0f3a
Compare
Fixes the transition when closing an overlay with an opaque backdrop appearing broken. The issue comes the fact that when we start animating the backdrop out, we also remove the `backdropClass` which makes the backdrop transparent. We don't need to remove the class, because we'll remove the backdrop from the DOM and clear the reference once the transition is done.
Fixes the transition when closing an overlay with an opaque backdrop appearing broken. The issue comes the fact that when we start animating the backdrop out, we also remove the `backdropClass` which makes the backdrop transparent. We don't need to remove the class, because we'll remove the backdrop from the DOM and clear the reference once the transition is done.
The following code used to show the Overlay only when resolving data or loading lazy modules: CoreModule
LoaderService
Now it shows the Overlay even on routes without data or lazy module. Can you confirm this fix broke my code? If so, can you suggest what I should do to restore the previous behavior? For reference, my question on StackOverflow: https://stackoverflow.com/questions/54135784/updating-to-angular-7-2-broke-my-global-loader |
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 transition when closing an overlay with an opaque backdrop appearing broken. The issue comes the fact that when we start animating the backdrop out, we also remove the
backdropClass
which makes the backdrop transparent. We don't need to remove the class, because we'll remove the backdrop from the DOM and clear the reference once the transition is done.