Kendo-angular: Button icons are removed from the DOM during :leave animation transition

Created on 18 Oct 2017  路  5Comments  路  Source: telerik/kendo-angular

I'm submitting a...

  • Bug report

Current behavior

Button icons are removed from the DOM during :leave animation transition

Expected behavior

Button icons are not removed from the DOM during :leave animation transition

Reproduction

http://plnkr.co/edit/0isC66y8r1Opxfkib60F?p=preview

Tested browsers:

  • Chrome (desktop) version 61.0.3163.100
  • Safari (desktop) version 11.0 (13604.1.38.1.6)
  • Edge version 15
Bug buttons

Most helpful comment

Fixed in v3.0.5-dev

All 5 comments

Thanks for reporting this, very peculiar. The button ngOnDestroy hook is called immediately when the animation starts, and it cleans up the markup for the button. This behavior looks like a bug in angular (see this plunker). I have logged this in the Angular repo. I am afraid that we do not have a hook that we can use to resolve this in the directive.

Fixed in v3.0.5-dev

Here's an updated plunkr.

@tsvetomir Out of curiosity, how did you fixed this? There are other repos running into this issue.

@Ploppy3 the fix was to leave the image elements in the DOM. Only the references to the elements are cleared in ngOnDestroy so they don't leak memory.

The elements are removed by Angular when the parent component is updated.

Was this page helpful?
0 / 5 - 0 ratings