can't scroll mdn with scroll anchoring enabled |
|||
Issue description1. Go to https://developer.mozilla.org/en-US/docs/Web/Events/visibilitychange 2. Scroll down. You keep getting scrolled back to the top.
,
May 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2fd28b5102e73c49b3891d9bc7c05ffda979e2ea commit 2fd28b5102e73c49b3891d9bc7c05ffda979e2ea Author: skobes <skobes@chromium.org> Date: Wed May 18 21:27:18 2016 Implement bounce suppression in ScrollAnchor. An element can "bounce", by making the inverse of its last movement, when a scroll anchoring adjustment interacts with a scroll event handler that changes layout at a scroll offset threshold. ScrollAnchor now detects bounces by tracking the most recent adjustment and the element that triggered it (even if we have anchored to a different element since then), and suppresses repeat bounces. BUG= 598233 , 601906 , 603376 Review-Url: https://codereview.chromium.org/1971423002 Cr-Commit-Position: refs/heads/master@{#394552} [add] https://crrev.com/2fd28b5102e73c49b3891d9bc7c05ffda979e2ea/third_party/WebKit/LayoutTests/fast/layout/scroll-anchoring/onscroll-bouncing.html [modify] https://crrev.com/2fd28b5102e73c49b3891d9bc7c05ffda979e2ea/third_party/WebKit/Source/core/layout/LayoutObject.cpp [modify] https://crrev.com/2fd28b5102e73c49b3891d9bc7c05ffda979e2ea/third_party/WebKit/Source/core/layout/ScrollAnchor.cpp [modify] https://crrev.com/2fd28b5102e73c49b3891d9bc7c05ffda979e2ea/third_party/WebKit/Source/core/layout/ScrollAnchor.h
,
Jul 6 2016
Need to verify.
,
Jul 7 2016
This is fixed.
,
Jul 20 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ymalik@chromium.org
, Apr 18 2016Status: Available (was: Untriaged)
After some investigation, here's what I think is happening. We have a div on the right that becomes position:fixed once it is about to be scrolled out of view (simulating position:sticky). The html for the floating panel is roughly as follows: <div id = "div1" style="float:right"> <div id="div2"> This becomes position:fixed </div> </div> When we start scrolling past div1, JS on the page adds position:fixed to div2 which causes a layout, triggering the Scroll Anchor Save->Restore logic. We pick div1 as the anchor and adjust the scroll position because it scrolls with the scroller (div2 is what's actually fixed). Once the scroll position is adjusted, JS on the page removes position:fixed from div2 (because we adjust upwards and no longer need position:fixed) which causes another layout and an adjustment of the scroll offset to a location where position:fixed is added again. This issue is very similar to issue 601906 , where the root cause is that the changes made by JS interfere with the adjustments we make.