amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

the height of amp-list will be resized with some random height when user wants to navigate to another page

Open leonahliang90 opened this issue 8 years ago • 6 comments

ezgif com-video-to-gif

Hi guys, we notice since the version released of v1810052256480, the height of amp-list will be resized with some random height when user wants to navigate to another page, can you please check on this ? appreciate your guys assistance on this

to: @choumx @aghassemi

leonahliang90 avatar Oct 16 '18 14:10 leonahliang90

/cc @cathyxz as well

aghassemi avatar Oct 16 '18 14:10 aghassemi

https://github.com/ampproject/amphtml/pull/18148 i think this is the PR who is causing the issue, hope it helps

leonahliang90 avatar Oct 16 '18 15:10 leonahliang90

Thanks for the report (and the animated GIF).

This is an interesting one. It's caused by placeholder resizing in #18148. The placeholder animation is 690px and the amp-list is layout=fill which means it has a height of 1px at layoutCallback.

Since 690 > 1, the amp-list requests a height change to 690. However, this remains queued while the amp-list finishes rendering (3000px+ height). So the amp-list's resource still has a pending change-size (getPendingChangeSize()) of 690px.

This change size to 690px is finally triggered from a focus event listener in focus-history.js, which eventually triggers the flushing of the pending change-size.

To fix this, we should call resetPendingChangeSize() after render.

dreamofabear avatar Oct 16 '18 16:10 dreamofabear

ezgif com-video-to-gif 1

this is another more serious issue that we have been facing on ShopCart Page List ~

leonahliang90 avatar Oct 19 '18 08:10 leonahliang90

rollback should be in canary now

erwinmombay avatar Oct 19 '18 22:10 erwinmombay

ezgif com-video-to-gif 3

leonahliang90 avatar Oct 26 '18 07:10 leonahliang90