Skip to content

White space due to translate3d y parameter not resetting to 0px when scrolling to top fast. #96

@haZya

Description

@haZya

Describe the bug
Same issue as #39 (Probably)
A white space appears if I scroll fast using the scrollbar on the browser rather than using the mouse scroll. The area of whitespace seems to be proportional to the strength attribute of the Parallax.

To Reproduce
This can be reproduced with the codesandbox demo.
Scroll to the top using the browser scrollbar (fast) and sometimes the translate3d y parameter won't reset to 0px leaving some white space.

Expected behavior
No whites space when scrolling to top.
Currently I'm using a workaround to fix this by listening to scroll change and when it reaches to the top I reset the translate3d to
transform: translate3d(-50%, 0px, 0px)

Screenshots
Normal behavior:
normal

With the issue:
issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions