Bug 221624 - sticky position incorrect behavior in table with dir=RTL
Summary: sticky position incorrect behavior in table with dir=RTL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 14
Hardware: All All
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-09 13:09 PST by literalPie
Modified: 2021-03-17 13:18 PDT (History)
11 users (show)

See Also:


Attachments
Testcase (1.52 KB, text/html)
2021-03-04 15:38 PST, Simon Fraser (smfr)
no flags Details
Non-table test (798 bytes, text/html)
2021-03-04 15:55 PST, Simon Fraser (smfr)
no flags Details
Patch (5.47 KB, patch)
2021-03-04 20:55 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description literalPie 2021-02-09 13:09:51 PST
In a table with the directionality is set to RTL, the position of sticky elements incorrectly positioned horizontally. The amount that they are off seems to be related to how much the table can be scrolled (if the table can only be scrolled slightly, the position is only off by a little bit).

This is an issue in Safari 14.0.3 and Technology Preview 119, but Safari 13.1 behaves as expected as well as Firefox and Chrome. I am also seeing the issue in multiple iOS versions (13.0, 13.7, 14.1 all tested in a simulator)

See this stackblitz for a minimal reproduction of the bug: https://stackblitz.com/edit/rtl-sticky-table-bug
This was originally discovered when working with the Angular Material table. Here is an example of that table showing this bug: https://stackblitz.com/edit/rtl-sticky-bug-material
Comment 1 literalPie 2021-02-09 13:16:48 PST
I've noticed that if you open dev tools and highlight one of the incorrectly positioned elements, it highlights the correct position - not where the element is visible. Also, if there's a button in the incorrectly positioned element, you can click the button by clicking where the button should be - not where it is visible.
Comment 2 Radar WebKit Bug Importer 2021-02-16 13:10:14 PST
<rdar://problem/74403616>
Comment 3 Simon Fraser (smfr) 2021-03-04 15:38:27 PST
Created attachment 422300 [details]
Testcase
Comment 4 Simon Fraser (smfr) 2021-03-04 15:55:54 PST
Created attachment 422302 [details]
Non-table test
Comment 5 Simon Fraser (smfr) 2021-03-04 20:55:17 PST
Created attachment 422332 [details]
Patch
Comment 6 EWS 2021-03-05 10:51:51 PST
Committed r273982: <https://commits.webkit.org/r273982>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422332 [details].