yahoo/react-stickynode

Scroll on container other than body but still full page/window/viewport

capi1O opened this issue · 0 comments

According to issue #26 react-stickynode does not work if scrollable container is not <body />.

hankhsiao commented on Jul 6, 2016:

Sticky is not designed in this case. It needs fundamental changes. There are some fundamental differences. For example, to handle sticking to the viewport with high performance, we use position: fixed instead of using position: absolute and changing top all the time when scrolling (I know some sticky components do that). In this case, fixed won't be correct in a scrollable DIV.

I my app using NextJS which adds a div below body that cannot be removed (see https://stackoverflow.com/questions/65374790/can-you-modify-nextjs-mount-element-or-add-classes-to-next-div)>

I am still scrolling the full page / viewport though, so there would be no extra logic to add. Is there a workaround for this ?