Commit dba7ece
syn-zeta
Fix #43: Infinite loading tables
`this.$el.offsetTop` will always evaluate to 0 when `this.$el` is inside a `td` (but the scrolling element is a `table`).
This PR fixes the issue by explicitly calculating the top offset of `this.$el`, relative to the actual scrolling element, and not just the direct parent.
I tried to see if `this.$el.offsetTop` will be updated by just setting CSS `position` to `relative` on `tr`, `td`, and `this.$el`, and all combinations, but no luck there. The performance hit of this PR will be an extra `getBoundingClientRect` call for `this.$el`.1 parent 7af8b32 commit dba7ece
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | | - | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
0 commit comments