You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #837 from Addepar/jiayingxu/table-sticky-footer-offset-fix
The `TableStickyPolyfill` is used to position header and footer rows. The individual `th` and `td` offset positions are calculated for the footer rows so they remain “sticky”. There is a bug in the logic for calculating the bottom offset for table footer rows where the `rows` were being iterated backwards while the `heights` were iterated forwards. This bug manifests when table footer rows have varying heights and the list of heights is not a palindrome.
As shown in the image below, the table has 7 footer rows where the height of the 1st footer row is 74px and the height of all other footer rows is 26px. The bottom offset of the 6th row takes into account the height of the 1st row and not the 7th row due to the loop iteration direction bug.
The list `heights: [74, 26, 26, 26, 26, 26, 26]` is errantly being read in reverse order as `heights: [26, 26, 26, 26, 26, 26, 74]`.
The ember-twiddle demonstrates the issue [here](https://ember-twiddle.com/35a7259172fd509c4da030ac803fa937
).

0 commit comments