Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
capi1O opened this issue Feb 16, 2021 · 0 comments
Open

Comments

@capi1O
Copy link

capi1O commented Feb 16, 2021

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant