amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-ad triggering layout shifts, causing CLS to increase

Open martinschierle opened this issue 6 years ago • 2 comments

What's the issue?

amp-ad if used in top-slots seem to push content down, causing layout shifts. It isn't visible, but can be seen by devtools debug overlays

How do we reproduce the issue?

  • Set DevTools to disable cache, 3g, cpu throttle
  • Set DevTools to highlight layout shifts (devtools--> Rendering)
  • Load this url

Look out for the blue flash across all content below the ad:

image

Disclaimer - I can't proof the ad is at fault here, but seems like the likely root cause. Alternatively it might also be something with the sidebar overlay.

martinschierle avatar Mar 20 '20 14:03 martinschierle

@martinschierle I don't believe this is amp-ad related. I do see a warning related to the amp-sidebar usage (relating to where it is in the DOM). Does the issue persist if that is fixed?

kevinkimball avatar Nov 04 '20 18:11 kevinkimball

Sorry I failed to repro this anymore. Feel free to reopen.

lannka avatar Feb 23 '21 17:02 lannka