ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

browser back can cause clicks to not working in AMP Cache #30838

Open tanakayuki opened 3 years ago

tanakayuki commented 3 years ago

What's the issue?

browser back can cause clicks to not working in AMP. However, origin AMP is fine.

How do we reproduce the issue?

  1. Open Google AMP Cache
  2. Make transitions within the site
  3. Browser Back to AMP Cache (AMP Viewer) <- (Click not working here)

What browsers are affected?

I think it will happen at least if you use safari or chrome on iPhone with OS version 13 or higher.

My Device

VM Device(browserstack.com)

Which AMP version is affected?

Version 2010132225002

Screen Capture and AMP Cache URL

-

uskay commented 3 years ago

This seems to be a common issue we are seeing recently which is critical in reliability of the application. cc/ @nainar Reference: https://github.com/ampproject/amphtml/issues/27691#issuecomment-716868604

uskay commented 3 years ago

cc/ @flaviori , @choumx and @ericfs Have you seen this behaviour?

ericfs commented 3 years ago

Thanks for the detailed report. I think I was able to reproduce it.

Repro steps:

Long press to get a link preview does work:

Simulator Screen Shot - iPhone 11 - 2020-11-06 at 16 25 59

As does selecting text.

This makes me think we may be hitting a browser bug of some sort.

I am not able to reproduce when using https://akiba-pc.watch.impress.co.jp/docs/sp/1160/581/amp.index.html So it does seem to be something about showing the page in the AMP Viewer.

@jridgewell do you have any ideas here? I know Safari had some other scrolling related iframe changes so I'm wondering if this could be somehow related.

mauricengo-revolve commented 3 years ago

Wondering if there's any updates on resolving this issue and the one in https://github.com/ampproject/amphtml/issues/27691. This seem to be an issue for all AMP sites. Are these issues top priority? @flaviori , @choumx and @ericfs

ericfs commented 3 years ago

I think @flaviori was looking to get someone to work on #27691.

For this one, I don't have any additional insight. Pinging @jridgewell for thoughts.

ericfs commented 3 years ago

I think this is very likely a Safari bug. One thing that may fix it is to programmatically scroll the page. Something like window.scrollTo(scrollX - 0.1, 0).

@dvoytenko, @jridgewell, who would be a good owner for this issue? Are either of you in contact with Safari for other scrolling issues? It seems like this would be worth reporting.

dvoytenko commented 3 years ago

@ericfs Any possibility that this might be some sort of a glasspane in the viewer?

ericfs commented 3 years ago

Based on my observations, I don't think it is a glasspane. I can scroll within the iframe and once I scroll, I can click on links.

mauricengo-revolve commented 3 years ago

Hi @bartesn, @dvdyakonov, @flaviori , @choumx and @ericfs.

We want to fully launch our AMP site, however we're still seeing the link freezing issue. We observe this issue on other AMP sites as well. I believe It persist on most iPhone devices using Safari.

ericfs commented 3 years ago

@jridgewell @samouri Can this issue be reopened? It looks like the problem is happening again. I can reproduce in iOS Simulator 14.4 but not 13.4 with the previous example: https://www.google.com/amp/s/akiba-pc.watch.impress.co.jp/docs/sp/1160/581/amp.index.html

It looks like #31750 is no longer mitigating the issue.

ericfs commented 3 years ago

Filed b/191386761 as an internal issue in case there is anything that can be done on the Google side.

ericfs commented 3 years ago

It looks like this issue is resolved in iOS 15 which is still in beta.

danvuquoc commented 2 years ago

This seems to still be an issue in iOS 15.

DavidGonzalez21 commented 2 years ago

I can reproduce on IOS 15 google chrome Version 98.0.4758.85

Suoakira commented 2 years ago

Was there any resolution on this? We are still seeing this especially click on the organic links then navigiating to dirty amp and then back again to amp.