WebView vertical scroll not reset to zero on page load when open in overview disabled
Reported by
anthonyo...@gmail.com,
Jun 15 2016
|
||||||||||
Issue descriptionExample 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
,
Jun 16 2016
,
Jun 23 2016
Paul is this something you can look into?
,
Jun 23 2016
I'm probably not a good fit, since I'm not familiar with Android WebView or scrolling. +sgurun for further triage.
,
Jun 27 2016
,
Jun 27 2016
setLoadWithOverviewMode defaults to false. You don't even need to do anything special..
,
Jun 27 2016
don't repro in webview shell.
,
Jun 27 2016
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.
,
Jul 1 2016
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
,
Jul 28 2016
I can reproduce it now. Thanks! I will investigate.
,
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);
,
Jul 29 2016
Actually, to fix the problem, you need to enable both UseWideViewPort and OverViewMode webview.getSettings().setUseWideViewPort(true); webview.getSettings().setLoadWithOverviewMode(true);
,
Aug 18 2016
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.
,
Oct 21 2016
I have no idea why WebView does not work here. Sorry.. Unassign myself
,
Oct 23 2017
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
,
Nov 16 2017
Satya, is this still an issue?
,
Nov 16 2017
,
Nov 17 2017
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 |
||||||||||
Comment 1 by haraken@chromium.org
, Jun 15 2016