Issue metadata
Sign in to add a comment
|
Composited position: sticky thead moves with scroll.
Reported by
m.go...@gmail.com,
Feb 10 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Steps to reproduce the problem: 1. Open the test attached case (you can also use http://output.jsbin.com/puyutid/). 2. Move the mouse over the table (it has a black border). 3. Scroll down & up. What is the expected behavior? The green header should stay at the top of the table. What went wrong? The header scrolls down. In Safari 10 it stays up. What's also weird is that if I remove the `top: 0` rule from thead Safari then behaves as if `position: sticky` was not enabled (the thead scrolls out of the view) while Chrome keeps it at the top but in a non-steady way. It seems like it was trying to catch up to how much I scroll and it trembles. Did this work before? No Does this work in other browsers? Yes Chrome version: 58.0.3008.0 Channel: canary OS Version: OS X 10.12.3 Flash Version: The problem exists both in latest Canary & current stable (56). I couldn't check Firefox as it doesn't support `position: sticky` on table headers.
,
Feb 10 2017
Issue 672710 may be related.
,
Feb 10 2017
,
Feb 13 2017
Locally, I see 55.0.2883.87 (Official Build) (64-bit) : Header scrolls down 58.0.3010.0 (Official Build) canary (64-bit) : Header stays put Test team - can you please bisect this?
,
Feb 13 2017
@mikelawther For me both versions fail the test, including the latest Canary 58.0.3011.0. Perhaps it's macOS-only?
,
Feb 13 2017
#4 - Chrome 55 does not support position: sticky, so this issue is irrelevant to it. Support for position: sticky starts from Chrome 56.
,
Feb 14 2017
Cc'ing smcgruer@ from Issue 672710 for confirmation if the CL under review would work for this as well and confirmation if Issue 672710 is same. Position: Sticky was enabled by https://codereview.chromium.org/2468283005
,
Feb 14 2017
This is not nested sticky (as far as I can see there is only one sticky element), so it does not relate to issue 672710 . A few notes: 1. It's compositing-only, which will explain the difference in people who can/can't reproduce it on the same version of Chrome. High DPI devices will be promoting the scroller, low DPI devices won't be. 2. There is a flexbox involved, which has previously caused issues (e.g. issue 690580 ). 3. However my fix for issue 672710 does appear to fix the problem as long as the sticky is applied to the <th> instead of the <thead> (as per the CSS 2.1 spec for relative positioning, we are planning in the intermediate term to only honor position: sticky on <th> elements.) flackr - do you want to investigate since it isn't nested sticky, or are we happy to just bundle it under issue 672710 since apparently my CL will fix this too?
,
Feb 14 2017
Issue 690580 seems like it would be unrelated since there's no layout change as far as I can tell. I think we should add a test which will regress if this particular case regresses but otherwise consider it fixed as part of issue 672710 . This test could apply sticky top: 0 to the thead and th (so as to work with our current limitations but ensure that if thead sticky top: 0 becomes problematic when we do support it that we catch that case).
,
Feb 14 2017
#8 - the specification says that position: sticky acts like position: relative for table elements. I think <thead> is considered as a table element (the specification does not seem to mean <table> specifically), so why is it being sticky? If I understand correctly, Firefox does not stick table elements.
,
Feb 14 2017
Interesting. Firefox has a ticket to make `position: sticky` work on table parts so it's not that it being ignored inside tables is intended in a long run. If Safari did & Firefox plans to then perhaps the spec could be amended? This would be a very useful feature, people do need sticky table headers pretty often.
,
Feb 16 2017
Issue 692429 has been merged into this issue.
,
Feb 16 2017
Removing the Needs-Bisect as the owner for this is identified. Please add it back if this requires bisect. Thank you!
,
Feb 17 2017
Re #10, #11: back in Oct 2014 a clarification was requested for table elements, and the reply[1] appears to back the interpretation that position: sticky should apply to table elements and the element should be offset relative to the flow root not its normal position. A wording clarification was promised but appears not to have materialized. Note however that Chromium currently follows the CSS 2.1 spec for position: relative[2], and in the short term at least this is going to force us to ignore position: sticky on <thead> and <tr> elements, as the Blink implementation of those elements makes some CSS 2.1 based assumptions. We do and will support sticky <th> elements. [1]: https://lists.w3.org/Archives/Public/www-style/2014Oct/0236.html [2]: https://www.w3.org/TR/CSS2/visuren.html#propdef-position
,
Feb 17 2017
This is a dupe of issue 692263 ; both are caused by us incorrectly including the scroll offset in parent_relative_sticky_box_rect and will be fixed by the same patch. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by m.go...@gmail.com
, Feb 10 2017375 KB
375 KB Download
212 KB
212 KB Download
367 KB
367 KB Download
172 KB
172 KB Download