amp-iframe overflow div moved outside of <p>
What's the issue?
When an amp-iframe is the child of a p, any div children of the iframe (including ones with the overflow property) are moved outside of both the amp-iframe and p tags. When an amp-iframe is resizable, this causes it to become invalid because it no longer has an overflow element.
How do we reproduce the issue?
Demo with the same iframe as a child of a p and standalone
https://jsbin.com/bahuxecuwu/1/edit?html,output
What browsers are affected?
All browsers, as far as I can tell
Which AMP version is affected?
Powered by AMP ⚡ HTML – Version 2011070101001
This issue is WAI since a div element cannot be a (nested) child of p element since p element's content model is phrasing content. For more info, see this stackoverflow page.
I have a PR to update the amp-iframe doc to instead use a span or button in this specific case.
@dmanek thanks, that makes sense!