New issue
Advanced search Search tips

Issue 620197 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

WebView vertical scroll not reset to zero on page load when open in overview disabled

Reported by anthonyo...@gmail.com, Jun 15 2016

Issue description

Example URL:
http://reddit.com/

Steps to reproduce the problem:
1. create a WebView with setLoadWithOverviewMode(false);
2. load almost any site, like http://reddit.com/
3. scroll down the page
4. click a link, such as the comments for a post

What is the expected behavior?
When new page is loaded, the top of the page should be visible. That is, the scrollY should be zero.

What went wrong?
When *not* in overview mode, page loads but is already scrolled down somewhat. When new pages load, scrollY should be zero.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Android 4.4 and any pre-Play Store System WebView

Does this work in other browsers? Yes 

Chrome version: 52.0.2743.32  Channel: n/a
OS Version: 6.0.1
Flash Version: none
 
Components: -Blink Blink>Scroll
Components: Mobile>WebView
Cc: dtapu...@chromium.org
Owner: paulmeyer@chromium.org
Status: Assigned (was: Unconfirmed)
Paul is this something you can look into?
Owner: sgu...@chromium.org
Status: Untriaged (was: Assigned)
I'm probably not a good fit, since I'm not familiar with Android WebView or scrolling.

+sgurun for further triage.

Comment 5 by sgu...@chromium.org, Jun 27 2016

Owner: hush@chromium.org
Status: Assigned (was: Untriaged)

Comment 6 by hush@chromium.org, Jun 27 2016

setLoadWithOverviewMode defaults to false. You don't even need to do anything special..

Comment 7 by sgu...@chromium.org, Jun 27 2016

don't repro in webview shell.

Comment 8 by hush@chromium.org, Jun 27 2016

Labels: Needs-Feedback
I don't know what "click on a comment" means. It does not open new links. When I just click on random links, the scroll offsets are 0 for the new pages. 

There must be something else in your app doing that's causing problems.
reddit.com now has a mobile site which behaves differently. Desktop user agent is needed, but please try again on a site where user agent does not matter. Instructions below and screenshots attached. Thank you.

1. create a WebView with setLoadWithOverviewMode(false);
2. load a site, like http://pclinuxos.com/
3. scroll down the page
4. click a link to an article

This happens on many sites and I see it in other apps too. Screenshots show:
1) home page scrolled down to see articles at the bottom
2) after clicking link, page is scrolled down so article is not visible
3) need to scroll up to see article
home page.png
191 KB View Download
after click.png
98.3 KB View Download
after scrolling up.png
154 KB View Download

Comment 10 by hush@chromium.org, Jul 28 2016

I can reproduce it now. Thanks! I will investigate.

Comment 11 by hush@chromium.org, Jul 28 2016

I can confirm this is a webview only issue. And it seems that "overview mode" has nothing to do with it because I enabled overview mode and the problem recurs.

However, you can fix the problem by enabling UseWideViewPort.
        webview.getSettings().setUseWideViewPort(true);

Comment 12 by hush@chromium.org, Jul 29 2016

Actually, to fix the problem, you need to enable both UseWideViewPort and OverViewMode        
webview.getSettings().setUseWideViewPort(true);
webview.getSettings().setLoadWithOverviewMode(true);

I want to make clear that #12 is not technically a "fix", but a workaround. The workaround is actually not adequate for my purposes as I need to be able to set those WebView options arbitrarily. Please fix, and thank you.

Comment 14 by hush@chromium.org, Oct 21 2016

Owner: ----
Status: Available (was: Assigned)
I have no idea why WebView does not work here. Sorry..
Unassign myself
Project Member

Comment 15 by sheriffbot@chromium.org, Oct 23 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Satya, is this still an issue? 
Cc: satyavat...@chromium.org
Status: WontFix (was: Untriaged)
I'm not able to reproduce with Pixel 2 XL / OMR1 64.0.3269.0 AND 63.0.3239.54 

Sign in to add a comment