Open zetagame opened 3 years ago
Investigating.
If I turn on Rendering > Layout Shift Regions
on devtools, the reported regions are quite distant from the video's position. This is likely from the docking actions alternating position: static
, absolute
and fixed
.
https://user-images.githubusercontent.com/254946/113368232-17546280-9313-11eb-82a2-d41919a24b6e.mp4
Still investigating but some good news.
I've tried this in the Canary version of Chrome (91), and some changes in reporting have alleviated this problem.
The CLS event count went down from three to just one.
I suspect that the remaining shift is caused by switching from position: fixed
to absolute
when undocking. This makes sense if the previous three events were caused by position
changes:
static
to fixed
fixed
to absolute
, then static
https://user-images.githubusercontent.com/254946/113602805-ef594d80-95f7-11eb-9c17-d380970fe915.mp4
What's the issue?
When testing with several video players (including amp-video and amp-youtube) amp-video-docking incurs a CLS and increases the score in Web Vitals by ~.026 on float and ~.015 on docking.
How do we reproduce the issue?
https://jsbin.com/sudacim/edit?html,output
What browsers are affected?
Tested on Chrome as it pertains to Web Vitals
Which AMP version is affected?
0.1