Skip to content

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

Open
@capi1O

Description

@capi1O

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions