New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 624525 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
(currently inactive on Chromium)
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 558575



Sign in to add a comment

Scroll anchoring doesn't work for LayoutText on Mobile

Project Member Reported by ymalik@chromium.org, Jun 29 2016

Issue description

Using 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?

 

Comment 1 by skobes@chromium.org, Jun 29 2016

It's working for me.  Are you scrolling down after step 1?  We special-case 0,0.

Comment 2 by ymalik@chromium.org, Jun 29 2016

There's JS on the page to scroll to (0, 1) to pass that special case.

Comment 3 by ymalik@chromium.org, Jun 29 2016

I can repro it even if I scroll just slightly during load.

Comment 4 by skobes@chromium.org, Jun 29 2016

Oh I see.  Yes it may be something odd about the <br>.
Cc: -ymalik@chromium.org
Owner: ymalik@chromium.org
Status: Started (was: Available)

Comment 7 by ymalik@chromium.org, Sep 14 2016

Status: WontFix (was: Started)
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