kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

kendo-popup -> OnPush -> not aligned correctly on first run

Open meriturva opened this issue 4 years ago • 4 comments

Just see: https://stackblitz.com/edit/angular-he4vwr

it is an example with OnPush change detection strategy, nothing else. On the first run, you see popup not well aligned (see image attached). After one click or window resize you could see that popup restores his correct position.

image

meriturva avatar Mar 02 '20 10:03 meriturva

As a workaround, you can use markForCheck to explicitly marks the view as changed in ngAfterViewInit hook: https://stackblitz.com/edit/angular-vl63ck-cazyu3?file=app/app.component.ts

Note that the issue is not reproduced in Angular 9.

mbechev avatar Mar 17 '20 11:03 mbechev

In my case is still present on angular 9 and it is related to animation. If I disable animate property on popup everything works great. I will wait for this fix and then I will try to reproduce more accurately issue, Reproduce issue with our complex layout is really difficult in that case. Again thanks.

meriturva avatar Mar 17 '20 13:03 meriturva

Hi @meriturva, Please find the attached Angular 9 project and check the Popup behavior: test-popup.zip Extract the zipped file and use the following commands to run the application:

  • npm install
  • ng serve

mbechev avatar Mar 17 '20 13:03 mbechev

This bug continue to occur using @progress/[email protected]. It's a real issue for us.

Do you plan to resolve it?

gregservera avatar Jul 13 '22 15:07 gregservera

There is an Output called positionChange, and it happened so that when I assign a handler to it, then it will notice alignAnchor value and render in proper place initially. I was not using onPush, but you can try to put markForCheck or detectChanges there.

<kendo-popup
    ...
    (positionChange)="test($event)"
    ...
test(event) {
    console.log(event);
    // this.cdr.markForCheck()
}

arsenlol avatar Dec 14 '22 10:12 arsenlol

The issue is no longer reproducible using the latest (v13) @progress/kendo-angular-popup version https://stackblitz.com/edit/angular-8tuhvr

stnikolova avatar Jun 15 '23 07:06 stnikolova