amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Amp Viewer Does Not Display Text and Overlaps Content

Open sarahgriffis opened this issue 9 years ago • 18 comments

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:

  1. Google not rays pizza brooklyn
  2. Click on the AMP result.

Directly:

  1. 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 png 2

Overlapping Content png 1

No Text png

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

sarahgriffis avatar Oct 27 '17 17:10 sarahgriffis

/to @ericfs @jridgewell ptal

dvoytenko avatar Nov 01 '17 21:11 dvoytenko

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

ericfs avatar Nov 01 '17 22:11 ericfs

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.

ericfs avatar Nov 03 '17 19:11 ericfs

Can you get the page to load? It's still invalid for me.

jridgewell avatar Nov 03 '17 20:11 jridgewell

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?

jridgewell avatar Nov 03 '17 20:11 jridgewell

Actually, it's the display: flex on the <amp-carousel>! Mind blowing.

jridgewell avatar Nov 03 '17 21:11 jridgewell

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.

dvoytenko avatar Nov 03 '17 21:11 dvoytenko

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.

jridgewell avatar Nov 03 '17 21:11 jridgewell

Ok. I'll pass it along. What could be a fix though? I believe display:flex is pretty important on carousels.

/cc @camelburrito

dvoytenko avatar Nov 03 '17 21:11 dvoytenko

yeah carousel would lose functionality (looping) without flex

camelburrito avatar Nov 03 '17 21:11 camelburrito

@jridgewell Does this fail in iOS11?

dvoytenko avatar Nov 03 '17 21:11 dvoytenko

Only in iOS 11.

jridgewell avatar Nov 03 '17 21:11 jridgewell

@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 avatar Nov 03 '17 21:11 jridgewell

@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!

sarahgriffis avatar Nov 04 '17 12:11 sarahgriffis

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.

jridgewell avatar Nov 06 '17 19:11 jridgewell

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.

rudygalfi avatar Nov 13 '17 18:11 rudygalfi

iOS 11.3 has been released yesterday and this bug seems to be fixed.

fred-wang avatar Mar 30 '18 19:03 fred-wang

👏, agreed it seems to be fixed now.

jridgewell avatar Apr 09 '18 20:04 jridgewell