Bug 218330 - Caption of table causes offset on sticky positioned table elements
Summary: Caption of table causes offset on sticky positioned table elements
Status: RESOLVED DUPLICATE of bug 224415
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2020-10-29 04:36 PDT by Derk-Jan Hartman
Modified: 2021-09-01 05:21 PDT (History)
6 users (show)

See Also:


Attachments
testcase with and without caption (1.40 KB, text/html)
2020-10-29 04:36 PDT, Derk-Jan Hartman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Derk-Jan Hartman 2020-10-29 04:36:51 PDT
Created attachment 412633 [details]
testcase with and without caption

When you use position:sticky; top:0; on a table element, you expect this element to stick to the top of the overflowing frame. This usually works, unless you also have a <caption> element on your table. The caption elements have rather unique box model behavior, which introduces an offset that the sticky headers accidentally use as well.

I'm not entirely sure if this is per the current specification or not. I do know that it doesn't match my expectations, and it doesn't match the behavior of Chrome and Firefox.

I have included a reproduction of this problem showing behavior with and without caption element in a table.
Comment 1 Radar WebKit Bug Importer 2020-10-29 09:52:20 PDT
<rdar://problem/70813326>
Comment 2 Smoley 2020-11-02 16:20:31 PST
Thanks for filing, this reproduces for me on Safari 13.1.3 as well as STP 115 with the included test case.
Comment 3 Martin Robinson 2021-08-25 03:55:25 PDT
This should be fixed now.

*** This bug has been marked as a duplicate of bug 224415 ***
Comment 4 Derk-Jan Hartman 2021-09-01 05:20:45 PDT
@Martin Robinson

Are we sure ? I see several other sticky bugs are indeed fixed in my TP, but this specific one still seems to reproduce. At least with: Release 130 (Safari 15.0, WebKit 16612.1.26.1.5)
Comment 5 Derk-Jan Hartman 2021-09-01 05:21:46 PDT
ah the latest TP is from august 18th I see.....