amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Allow for AMP ad anchors to target _top

Open keithwrightbos opened this issue 10 years ago • 11 comments

Short description of your issue:

Anchor links within an iframe that lead to itunes do not navigate on Safari iOS 9 however AMP validator does not allow target _top.

How do we reproduce the issue?

  1. browser is safari on ios 9
  2. there is a link that leads to itunes
  3. link is in iframe
  4. link has target=_blank
  5. click on link does not navigate

What browsers are affected?

Safari iOS 9

Which AMP version is affected?

All

Proposed Fix

Allow for data-target=_top attribute on anchors within amp-ad which will have their target changed to _top via AMP runtime.

keithwrightbos avatar Sep 30 '16 00:09 keithwrightbos

/cc @cramforce

dvoytenko avatar Oct 08 '16 00:10 dvoytenko

@keithwrightbos We're tracking this in b/32003819. Could you take a look and see if this is a separate issue?

cramforce avatar Oct 10 '16 13:10 cramforce

Change within validator is ideal and appears to be imminent so closing.

keithwrightbos avatar Oct 11 '16 15:10 keithwrightbos

Just to be sure I understand, this is a runtime-only change, not a validator change, correct?

Gregable avatar Oct 11 '16 16:10 Gregable

@Gregable We don't currently limit target=_top, right? I checked, but want to make sure. If we did not allow it, we should allow it now.

cramforce avatar Oct 11 '16 17:10 cramforce

For <a> tags and a few other places, we allow only target=_self and target=_blank. The original thread mentions data-target, which we do not constrain.

Gregable avatar Oct 11 '16 19:10 Gregable

OK

Gregable avatar Oct 11 '16 21:10 Gregable

Fixed. Not live yet.

Gregable avatar Oct 13 '16 22:10 Gregable

What's ETA of it being live?

nbeloglazov avatar Oct 20 '16 19:10 nbeloglazov

Next week.

Gregable avatar Oct 20 '16 20:10 Gregable