question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`amp-iframe` overflow elements layered behind iframe content

See original GitHub issue

When an overflowing resizable <amp-iframe> element is loaded in the viewport, and therefore not resized automatically, I would expect the overflow element to be positioned in front of the iframed content so that site visitors are able to easily tap it. Instead, the overflow element is currently positioned behind the iframe content.

You can reproduce this using the Disqus for Accelerated Mobile Pages (AMP) example, modified slightly since their example doesn’t include the required overflow element.

Here’s a test page to demonstrate the issue when viewed in a narrowish viewport, e.g. 480px wide, on Chrome, Safari or Firefox for Mac (others may be affected too):

https://amphtml-test.appspot.com/amp-iframe/resizable.html

Screenshot: amp-iframe-overflow-bug

Please can you confirm whether this is a bug or if there’s something else causing this which can easily be prevented? Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dvoytenkocommented, Jan 17, 2017

Actually, now that I thinking this through - this is an expected behavior. z-index requires non-static positioning. So, this is definitely a bug.

0reactions
tonyruscoecommented, Jan 17, 2017

Thanks for tracking down the cause and fixing the issue, @dvoytenko!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does <amp-iframe> show overflow child element?
Iframe resizing is used when you have an iframe of non-fixed size. So you render iframe and use postMessage from iframe to resize...
Read more >
Documentation: <amp-iframe> - amp.dev
The amp-iframe must be defined with the resizable attribute. · The amp-iframe must have an overflow child element. · The amp-iframe must set...
Read more >
4.8.2 The iframe element — HTML5 - W3C
The iframe element supports dimension attributes for cases where the embedded content has specific dimensions (e.g. ad units have well-defined ...
Read more >
Installing Heap in an iFrame - Developer Guides Overview
The iframe element is often used to insert content from another source, such as a video or social media button, into a page....
Read more >
AMP, iOS, Scrolling and Position Fixed | by Dima Voytenko
In short, we scroll the actual `BODY` element of the document. Thus, even though the iframe itself does not scroll, the content of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found