New issue
Advanced search Search tips

Issue 692608 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Sticky position not updated when elements are added to the scrolling container

Reported by stevel...@gmail.com, Feb 15 2017

Issue description

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

Steps to reproduce the problem:
Reduced test case for table elements
1. Go to https://jsfiddle.net/574v2eyg/
2. The `th` elements have sticky position while scrolling the entire `tbody`.
3. Click the "Add more rows" button.
4. Observe that the `th` elements scroll out of view when scrolling to the appended rows.

Reduced test case for non-table elements
1. Go to https://jsfiddle.net/utxywmg2/
2. The `header` element has sticky position while scrolling the original `p` elements.
3. Click the "Add more paragraphs" button.
4. Observe that the `header` element scrolls out of view when scrolling to the appended paragraphs.

What is the expected behavior?
Elements with position:sticky should continue to be sticky when new elements are added that affect the scroll height of the container.

What went wrong?
Adding new elements that affect the scroll height of the container causes elements with position:sticky to behave as if the scrolling container itself is being scrolled out of view.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 56.0.2924.87  Channel: stable
OS Version: CentOS Linux release 7.3.1611 (Core)
Flash Version: Shockwave Flash 24.0 r0

I searched through other bug reports related to position:sticky. Some of them sound possibly related, but it's very difficult to tell for sure.

 

Comment 1 by stevel...@gmail.com, Feb 15 2017

Firefox does not support position:sticky on table elements, but the second test case for "non-table elements" works as expected for me in Firefox 45.7.0.

Comment 2 by e...@chromium.org, Feb 15 2017

Owner: flackr@chromium.org
Status: Assigned (was: Unconfirmed)
 Issue 692726  has been merged into this issue.
 Issue 694290  has been merged into this issue.
kawaru, have you seen my comment on  Issue 692726 ? I don't think it's a duplicate of this one. It doesn't use position:sticky, and actually involves scroll positions (scrollTop) changing in response to element being added and removed.

I would also say that  issue 692726  is much higher priority, because it isn't about a breakage in an experimental CSS feature only supported by a couple of browsers; it describes a breakage of a feature that's worked in every browser for the last decade.

Comment 6 by smcgruer@google.com, Mar 24 2017

Status: Fixed (was: Assigned)
This appears to be fixed on Canary, likely from one of the changes about invalidating sticky at the correct times.

Sign in to add a comment