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

With latest dependencies, the :enter animation only plays the first time the popover is opened #194

Open
ccjmne opened this issue Aug 12, 2020 · 9 comments
Assignees
Labels

Comments

@ccjmne
Copy link

ccjmne commented Aug 12, 2020

Here's a demo Stackblitz that illustrates the problem.

I just:

NB: Actually, the opening animation does play again if you re-trigger an opening while the closing animation is playing.

I don't quite know what's broken and will keep investigating a bit tonight 🙂

@ccjmne
Copy link
Author

ccjmne commented Aug 12, 2020

Looks like the culprit is @angular/cdk and that the breaking change was introduced between 10.1.1 and 10.1.2.

@isaackehle
Copy link
Member

I updated the project to 7.0.0 to use angular 11, then updated the stackblitz pages here and here. Please lmk if you see anything off. Thanks!

@jotatoledo
Copy link
Contributor

jotatoledo commented Nov 23, 2020

still broken, please reopen

@isaackehle isaackehle reopened this Nov 23, 2020
@isaackehle
Copy link
Member

I've been spinning my wheels for a few hours w/ this. @ccjmne do you have any idea how this can be fixed?

I was thinking possibly some combination of tweaking popover.animations.ts or _onAnimationDone().

When I change to this:

<ng-template>
  <div
    class="sat-popover-container"
    #focusTrapElement
    [ngClass]="_classList"
    [@transformPopover]="_getAnimation()"
    (@transformPopover.start)="_onAnimationDone($event)"
    (@transformPopover.done)="_onAnimationDone($event)"
  >
    <ng-content></ng-content>
  </div>
</ng-template>

I can see the good animations occur when this order happens:

  • start: void -> visible
  • end: void -> visible
  • start: visible -> void
  • start: void -> visible
  • end: visible -> void
  • end: void -> visible

but the failed actions occur when they are in the more standard order of:

  • start: void -> visible
  • end: void -> visible
  • start: visible -> void
  • end: visible -> void
  • start: void -> visible
  • end: void -> visible

Perhaps something is not being cleared appropriately?

@isaackehle
Copy link
Member

isaackehle commented Nov 23, 2020

See fix/issue-194_animations

@fxck
Copy link

fxck commented Jan 19, 2021

Shouldn't this be reported upstream to material/cdk? Doesn't really seem related to popover. At least from what I tried.

@isaackehle
Copy link
Member

@fxck Agreed. I'm glad someone else verified that this is likely outside of the scope of this project. Thank you.

@flavianoredressa
Copy link

Any solution ?

@isaackehle
Copy link
Member

I am checking into PR #220 now that hopefully will fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants