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

Issue 650017 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
(currently inactive on Chromium)
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Compat



Sign in to add a comment

Scroll Anchoring is confused by scrolling log windows

Reported by ivan@ludios.org, Sep 25 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.34 Safari/537.36

Example URL:
http://archivebot.at.ninjawedding.org/

Steps to reproduce the problem:
1. Enable Scroll Anchoring in chrome://flags and restart Chrome
2. Load http://archivebot.at.ninjawedding.org/
3. Scroll to the middle of the page and wait briefly
4. Observe that the entire page appears to scroll up

If this does not repro, make sure Scroll Anchoring is enabled and try a slightly different scroll position on the page.

What is the expected behavior?
Scroll Anchoring doesn't scroll the page up

What went wrong?
Scroll Anchoring scrolls the page up

Does it occur on multiple sites: No

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 54.0.2840.34  Channel: beta
OS Version: 
Flash Version:
 
Labels: Needs-Bisect

Comment 2 by ajha@chromium.org, Sep 29 2016

Cc: ajha@chromium.org
Labels: -Needs-Bisect M-55 OS-Mac OS-Windows
Owner: skobes@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on the latest beta(54.0.2840.41) on Windows 10, Mac OS 10.11.6 and Linux Ubuntu 14.04.

Triaging this for more inputs.

skobes@: Could you please take a look at this.
Cc: skobes@chromium.org
Owner: ymalik@chromium.org
Status: Started (was: Assigned)
So the page has a main scroller and a bunch of nested scrollers.

The nested scrollers grow in size as the list is populated, and the most recent item is scrolled into view. 

We anchor to something in the nested scroller for the main scroller and when that moves, we make an incorrect adjustment.

Currently, we clear the scroll anchor on a scroller when the scroll position changes due to any non-anchoring related reason.

I think the right thing to do is probably walk up the scroll chain and clear the anchor for all scrollers?

@skobes, wdyt?
I agree. :)

At minimum a non-anchoring scroll of a scroller S needs to clear the anchor of any scroller that is anchored to something inside S.

Clearing all the ancestor scrollers is the cleanest way to achieve that.

Comment 6 by ojan@chromium.org, Oct 7 2016

This makes sense to me too.

Comment 7 by ivan@ludios.org, Oct 10 2016

FYI http://archivebot.at.ninjawedding.org/ has deployed `html, body { overflow-anchor: none; }` to work around this, so please uncheck that style in developer tools if you ever need to use that as a test page.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/121a3d55a69bb82a46ee9e3159a0be1810052368

commit 121a3d55a69bb82a46ee9e3159a0be1810052368
Author: ymalik <ymalik@chromium.org>
Date: Wed Oct 12 15:49:55 2016

Clear scroll anchor on all parent scrollers from ScrollAnchor::clear

Before this CL, a call to ScrollAnchor::clear() would clear the anchor node
on the containing scroller, and set the LayoutObject::IsScrollAnchorObject
bit on the anchor if there is no other scroll referencing it.

With this CL, a call to ScrollAnchor::clear() walks up the parent chain and
clears the scroll anchor for every scroller encountered in the walk. As a
result, the LayoutObject::IsScrollAnchorObject is always set to false.

This CL is dependent on https://codereview.chromium.org/2400723002

BUG= 650017 

Review-Url: https://codereview.chromium.org/2394053004
Cr-Commit-Position: refs/heads/master@{#424748}

[modify] https://crrev.com/121a3d55a69bb82a46ee9e3159a0be1810052368/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] https://crrev.com/121a3d55a69bb82a46ee9e3159a0be1810052368/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/121a3d55a69bb82a46ee9e3159a0be1810052368/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp
[modify] https://crrev.com/121a3d55a69bb82a46ee9e3159a0be1810052368/third_party/WebKit/Source/core/layout/ScrollAnchor.h
[modify] https://crrev.com/121a3d55a69bb82a46ee9e3159a0be1810052368/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp

Comment 9 by ymalik@chromium.org, Oct 13 2016

Components: Blink>Scroll
Labels: Hotlist-Input-Dev
Status: Fixed (was: Started)

Sign in to add a comment