Scroll anchoring doesn't work for LayoutText on Mobile |
||||
Issue descriptionUsing dev-tools mobile emulation (1) Go to https://jsbin.com/galoyu/quiet (2) Wait for 5 seconds (3) Notice the jump that scroll anchoring should have fixed AFAICT, we are anchoring to the LayoutText created from the <br> tag. During ScrollAnchor::save, it's position relative to the viewport is (8, 23), which seems reasonable. During ScrollAnchor::restore, its (8, 8), yielding an adjustment of (0, -15), which doesn't make sense because the anchor should have moved down. This may have something to do with the <br> tag. Note that this works fine on desktop and on mobile when the viewport <meta> tag is removed from the page. @skobes, any idea what could be going on?
,
Jun 29 2016
There's JS on the page to scroll to (0, 1) to pass that special case.
,
Jun 29 2016
I can repro it even if I scroll just slightly during load.
,
Jun 29 2016
Oh I see. Yes it may be something odd about the <br>.
,
Jul 6 2016
,
Jul 6 2016
,
Sep 14 2016
This is actually a non-issue. Scroll anchoring works as intended on the first page load, but not on subsequent page load. This is because the scroll anchor is cleared in FrameLoader::restoreScrollPositionAndViewState when we try to restore. There is no issue with LayoutText specifically. The right thing here is to fix issue 594879 . |
||||
►
Sign in to add a comment |
||||
Comment 1 by skobes@chromium.org
, Jun 29 2016