-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Responsive amp-ad iframe not correct width on IOS after orientation change. #2491
Comments
Thanks for the thorough report! Assigning to @dvoytenko mostly to check whether he has an immediate idea. |
Thanks @cramforce. As I mentioned, this is a known issue in Safari on Mobile. The suggestion in the Stack Overflow seems like a pretty solid workaround. |
This commit addresses the issue described here: ampproject#2491
Thanks @omegdadi. I filed the bug against WebKit: https://bugs.webkit.org/show_bug.cgi?id=155198 I will apply the fix you suggest. It looks like |
@dvoytenko I've updated the PR with the changes and added a comment in the CSS referencing the WebKit issue. |
This commit addresses the issue described here: ampproject#2491
This should be fixed now. Looks like it's going into "1457636119213" release with goes into canary later today. |
Responsive AMP ads do not size correctly on IOS (works fine in Android) when performing orientation changes. On load of the page, the iFrame is set to width:100% which allows it to grow properly when going from portrait to landscape, but when returning to portrait, the iFrame isn't resized.
How do we reproduce the issue?
https://services-staging.s3.amazonaws.com/AndyHills/AMP_HTML/amp_demo.html#development=1
What browsers are affected?
IOS Only, Mobile Safari/Chrome. Seen in IOS 9.2.1 (but not exclusively)
Which AMP version is affected?
This is the first time I encountered this issue in AMP, but I'm unable to determine when it started happening. This seems to be VERY related to several IOS viewport width + orientation issues I've seen in the past. So, I don't think the bug is in AMP code, but rather that AMP needs to work around this bug in Safari. Again, works fine in Android :-)
AMP version: 1456954860788
Suggested workaround (Note: Applying the CSS rule suggestion in this SO using Safari dev tools seemed to alleviate the issue):
http://stackoverflow.com/questions/20123960/how-to-get-iframe-width-100-in-iphone-portrait-view
The text was updated successfully, but these errors were encountered: