amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

AMP4ADS in <AMP-AD> sets z-index breaking UI

Open rafaguerrero opened this issue 7 years ago • 5 comments

What's the issue?

It seems that an AMP4ADS creative is setting an inline z-index: 30 style to the AMP-AD element, making the Ad appear over UI elements of the page

How do we reproduce the issue?

URL : https://amp.larepublica.pe/politica/2019/09/05/martin-vizcarra-72-de-peruanos-rechaza-vacancia-presidencial-promovida-por-el-fujiaprismo-encuesta-datum-fuerza-popular-apra-congreso-de-la-republica/

It happens from time to time so you might need to refresh some times. You'll able to see the error with both the share bar at the bottom and the header on top.

What browsers are affected?

As far as I can see all devices and browsers are affected by this.

Which AMP version is affected?

I've been trying this with several adservers and versions and I couldn't find a pattern.

Screenshots

a11c8000-48b4-46c1-aa9a-9d94d73fba56 7c39df21-fbac-4d4e-948e-f9d4fe884199

rafaguerrero avatar Sep 20 '19 15:09 rafaguerrero

/cc @ampproject/wg-ads

dreamofabear avatar Oct 04 '19 15:10 dreamofabear

@ampproject/wg-ads @choumx

Any update on this? It's causing a lot of troubles with our UI.

The problem is that amp-ad-netwoork-doubleclick-impl.js sets a z-index: 11 in order to center an AD when the creative received width is bigger than the declared width in the amp-ad. This logic seems to have been introduced in #23554

Why do you need to modify the z-index to center a creative, breaking other page UIs?

Perhaps @keithwrightbos could help us here

oliverfernandez avatar Dec 17 '19 09:12 oliverfernandez

@keithwrightbos @glevitzky was z-index to solve some issue?

lannka avatar Dec 17 '19 21:12 lannka

Confirmed with @glevitzky that this is not needed. @glevitzky is going to remove it in an upcoming PR.

lannka avatar Dec 17 '19 22:12 lannka

Great news, thanks! Please let me know if you need any more info or more AMP pages examples

oliverfernandez avatar Dec 18 '19 08:12 oliverfernandez