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

Issue 827033 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Inserting HTML into an absolute positioned element scrolls the parent container

Reported by eric.rannaud@gmail.com, Mar 29 2018

Issue description

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

Steps to reproduce the problem:
1. Load absolute-scroll.html
2. Immediately use the mouse wheel to scroll down a little, until the yellow box is partly off screen (and you can see its bottom somewhere in the middle of the viewport).

What is the expected behavior?
The scripts automatically adds a new line at the top of the yellow box every 200ms.

The container .main must not scroll while the yellow box .positioned expands (until the yellow box is larger than its parent, but with the testcase this takes a while). The yellow box should expand down out of the viewport. The "scroll" event must not be fired by the container .main.

What went wrong?
The yellow box .positioned is absolutely positioned with respect to the container .main, therefore adding content to the child should not scroll the parent, as the child is less tall than the parent.

See absolute-scroll-bad.mp4 for a screencast of the incorrect behavior.

Note that if you skip Step 2 above, the behavior is correct: the container does not scroll while the yellow expands -- until the yellow box reaches the height of the container. See absolute-scroll-good.mp4 for a recording of this case.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 65.0.3325.181  Channel: stable
OS Version: Arch Linux
Flash Version: 

Firefox 59.0.2 handles this properly: whether the user scrolls the container once manually or not (Step 2), the container does not scroll on its own while the yellow box expands -- until yellow reaches the height of the container, and then the container scrolls down to keep up with the yellow box.
 
absolute-scroll.html
8.4 KB View Download
absolute-scroll-bad.mp4
1.3 MB View Download
absolute-scroll-good.mp4
321 KB View Download

Comment 1 by woxxom@gmail.com, Mar 29 2018

See  issue 707120 :

  This is the intended behavior of the scroll anchoring feature.

  For more information about scroll anchoring, see the explainer at:
  https://github.com/WICG/ScrollAnchoring/blob/master/explainer.md

  Setting "overflow-anchor: none" is the correct solution if this behavior is not desired.

That is ".main { overflow-anchor: none; }" disables the feature in your case.
Thanks, you are correct. I had not heard of Chromium's new behavior.
Labels: Needs-Triage-M65
Cc: sindhu.chelamcherla@chromium.org
Components: Blink>Scroll
Labels: Triaged-ET
Status: WontFix (was: Unconfirmed)
As per comment#2 closing this issue as wont-fix.

@Reporter: Please feel free to raise a new issue if you feel so.

Thanks!

Sign in to add a comment