Amp Viewer Does Not Display Text and Overlaps Content
What's the issue?
The amp-viewer incorrectly overlaps content and does not display fonts. This is only present on certain iOS / browser versions (see table below).
How do we reproduce the issue?
Via search:
- Google
not rays pizza brooklyn - Click on the AMP result.
Directly:
- https://www.google.com/amp/s/www.notrayspizza.com/
Notice the buttons View Full Menu and Order Now on Slice do not have text, sometimes eventually populate, and overlap other content.
No Text

Overlapping Content

No Text

What browsers are affected?
| iOS version | Chrome Version | Safari Version | buggy/good |
|---|---|---|---|
| 10.3.2 (14F89) | 61.0.3163.73 | good | |
| 10.3.2 (14F89) | 10.0 | good | |
| 10.3.3 (14G60) | 10.0 | good | |
| 10.3.3 (14G60) | 61.0.3163.73 | 10.0 | good |
| 10.2.1 (14D27) | 10.0 | good | |
| 11.0.3 (15A432) | 11.0 | buggy | |
| 11.0.3 | 61.0.3163 | buggy | |
| 11.0.3 | 11.0 | buggy | |
| 10.2 (14C92) | 10.0 | buggy | |
| 11.0.3 | 61.0.3163.73 | buggy |
Which AMP version is affected?
Amp Version 1508794187431
/to @ericfs @jridgewell ptal
Thanks for the detailed browser analysis.
This only happens in the viewer?
It looks like the page is no longer shown in the viewer because it is not valid. https://www-notrayspizza-com.cdn.ampproject.org/c/s/www.notrayspizza.com/ https://search.google.com/test/amp?utm_source=gws&utm_medium=onebox&utm_campaign=suit&id=bkGJAbvaL1Ydd1llPkco0A
Seems like a Safari rendering bug of some sort, but not sure exactly what. Poking the styles in the doc temporarily fixes the issue. I don't see a viewer side fix here.
Can you get the page to load? It's still invalid for me.
Oooo, you hit a really cool compositing GPU bug. I'm not able to reduce it to an easy to see base case yet, but it's definitely due to our iOS scroll hacks and the border-radius style you have on the buttons.
I'm calling in @dvoytenko. Maybe you can figure out a solution?
Actually, it's the display: flex on the <amp-carousel>! Mind blowing.
Wow! @jridgewell do you still have a repro case? I want to run it by Igalia folk and see if we can file a WebKit bug.
https://output.jsbin.com/veficav/quiet
It's a really fun bug. The first button ("Order Now on Slice") reliably renders first for me. If we scroll down to the two buttons below the menu, they're reliably broken.
Select the span of one of the two buttons, toggle the color style. Both buttons will fix. But now the top button is broken. Scroll up, and toggle the same color style on the same button (the bottom one), and it'll fix the top button!
If you disable the display: flex on .i-amphtml-slides-container, all buttons are permanently fixed.
Ok. I'll pass it along. What could be a fix though? I believe display:flex is pretty important on carousels.
/cc @camelburrito
yeah carousel would lose functionality (looping) without flex
@jridgewell Does this fail in iOS11?
Only in iOS 11.
@camelburrito: We need to figure out a CSS fix quickly, there's nothing about these buttons that makes them abnormal to other elements. It's very likely others publishers are hitting this bug on common elements and not even knowing it.
@jridgewell We purposefully broken our AMP pages to be invalid until we're able to solve this and issue. Our CEO was on iOS 10.2 (14C92) and getting this bug, so it does seem to be present in iOS 10 as well.
Let me know if we can help! Thanks for looking into this!
This has been forwarded to Apple. https://bugs.webkit.org/show_bug.cgi?id=179315
It looks like this is a serious regression, affecting both iframed pages and non-iframed (normal) pages.
It looks like the webkit bug https://bugs.webkit.org/show_bug.cgi?id=179315 has had a patch submitted. I'm going to go ahead and close this out. I'm unsure of the Safari release schedule, but please re-open if the problem persists.
iOS 11.3 has been released yesterday and this bug seems to be fixed.
👏, agreed it seems to be fixed now.