New issue
Advanced search Search tips

Issue 696405 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Compat

Blocked on:
issue 734150


Participants' hotlists:
iOS-Web-Platform-Backlog


Sign in to add a comment

Going back from an AMP search result doesn't retain scroll position and sometimes appears to reload the page

Project Member Reported by sdy@chromium.org, Feb 27 2017

Issue description

Chrome Version: 58.0.3019.0 (screencast is from 56, but same behavior in 58)
OS: iOS

What steps will reproduce the problem?
(1) Search Google for, e.g., "news".
(2) Scroll down some.
(3) Click an AMP search result.
(4) Tap the back button.

What is the expected result?
The AMP page disappears with an animation, returning you to the Google search results page without passing through a loading state and retaining your scroll position. This works in Safari.

What happens instead?
Either the AMP page disappears with an animation or the search results page loads like a normal navigation. Either way, scroll position is lost.
 
amp_safari.mov
11.1 MB Download
amp_chrome.mov
14.9 MB Download

Comment 1 by sdy@chromium.org, Feb 27 2017

The key issue is that going back to Google from an AMP page is almost instantaneous in Safari (just a JS-driven animation; the search results page is unchanged), but in Chrome it sometimes involves a slow navigation and scroll position is lost.

This might be a Google bug, I can file it if anyone suspects that's the case.

Comment 2 by pkl@chromium.org, Feb 27 2017

Cc: kkhorimoto@chromium.org
Components: Mobile>WebView>Glue
Owner: eugene...@chromium.org
Status: Assigned (was: Untriaged)
This is when the link to the AMP page is not near the top of the search results.

Comment 3 by sdy@chromium.org, Feb 27 2017

The location of the link doesn't seem to matter for me (but losing scroll position becomes more noticeable the lower down it is).
Cc: -kkhorimoto@chromium.org eugene...@chromium.org
Owner: kkhorimoto@chromium.org
Assigning to Kurt, who worked on scroll position restoration.
Cc: kkhorimoto@chromium.org mrefaat@chromium.org
Owner: ----
Status: Available (was: Assigned)
Cc: danyao@chromium.org
+ danyao, since AMP pages are loaded in iframes

Comment 7 by danyao@chromium.org, May 18 2017

Labels: -Type-Bug Type-Compat

Comment 8 by rdb@chromium.org, Jul 12 2017

Cc: rdb@chromium.org

Comment 9 by danyao@chromium.org, Sep 29 2017

This may be related to crbug.com/747361. Maybe we didn't correctly save the scroll position of the SRP or we didn't restore it correctly.

In M63, I can't reproduce the issue consistently. Most of the time, the scroll position on SRP is restored correctly. However, it seems that losing the scroll position is correlated with a long load going back to SRP. So I wonder if the bug only affects slow-back, where we initiate a reload, instead of using WKBackForwardList to navigate back.
Blockedon: 734150
Labels: Proj-WKBackForwardList
Labels: -Proj-WKBackForwardList Proj-FixedByWKBackForwardList
Components: Mobile>iOSWeb
Components: -Mobile>WebView>Glue
Components: -Mobile>iOSWeb Mobile>iOSWeb>Scroll

Sign in to add a comment