Div 'skips' with non-zero margin
Opened this issue · 1 comments
camjackson commented
It seems that the sticky state does not kick in until the top-most element's border hits the edge of the screen.
That seems to make sense, except that if the first element inside the sticky div has non-zero margin, then it 'jumps' when the stickiness begins. I.e.:
- The element's margin does not trigger the sticky state
- The sticky state is triggered once the element's border hits the edge
- The element then gets wrapped in a fixed position div
- It's margin then causes it to be bumped down into the page, hence the 'jump' as it becomes sticky.
I think the fix needs to happen in your dom-find package, but I'm reporting the bug here because this is where the bug exhibits itself.
robbestad commented
Thanks for report, I'm looking into it now