New issue
Advanced search Search tips

Issue 686164 link

Starred by 7 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

position:sticky - Sticky position ancestor overflow layer should follow fixed position containing block chain.

Project Member Reported by flackr@chromium.org, Jan 27 2017

Issue description

Chrome Version: 58.0.2994.0
OS: All

What steps will reproduce the problem?
(1) Visit http://output.jsbin.com/woqicun
(2) Scroll the body.

What is the expected result?
Technically, both of the blue sticky boxes should stick 50px below the top of the viewport.

What happens instead?
Instead, the sticky box on the right (as it is a descendant of the overflow scroller) tries to stick 50px below the top of that scroller.

Interestingly, Firefox does not handle this case at all and both sticky boxes just don't stick. We could easily reproduce this behavior by nulling out the ancestorOverflowLayer whenever we pass a fixed position element as we propagate it down the PaintLayer tree, making it impossible to store the sticky position constraints.

Alternately, since fixed position doesn't move during the scroll of the page we could probably calculate the correct sticky position during layout and not try to update the sticky position during scroll / compositing.

Please use labels and text to provide additional information.

For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 

Comment 1 by flackr@chromium.org, Jan 27 2017

Also, if the fixed position ancestor is contained within a transformed element (and so no longer fixed within the viewport), then we may still want the sticky position element to stick as this would be similar to a non-fixed container.
Labels: -Pri-2 Pri-3
Summary: position:sticky - Sticky position ancestor overflow layer should follow fixed position containing block chain. (was: Sticky position ancestor overflow layer should follow fixed position containing block chain.)
 Issue 758521  has been merged into this issue.
Labels: Hotlist-Interop

Comment 5 by dona...@gmail.com, Sep 18 2017

This is fixed for me in Version 61.0.3163.91 
Cc: smcgruer@chromium.org
Components: -Blink>Paint Internals>Compositing>Scroll
Owner: ----
Status: Available (was: Assigned)
As far as I know this still isn't fixed as of M66. The right-hand sticky behavior still tries to position itself relative to the scroller element, even changing its behavior if you scroll the root layer and then refresh the page.

However, it's very low priority to fix because this is an unusual side-case (as far as I am aware) and Firefox doesn't do it correctly either.

Sign in to add a comment