pixelass / react-stickyroll

A react implementation of stickyroll (original)

Home Page:https://react-stickyroll.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong wrapper height when using factor

pixelass opened this issue · comments

Describe the bug
When using factor the height of the entire scrollArea is too small.
This will cause wrong behavior and a gap at the end of the view.

To Reproduce
Steps to reproduce the behavior:

  1. Add factor={3} pages={2}
  2. Look at the generated HTML
  3. The wrapper has a height of 700vh while there are 3 elements each with 300vh (900vh)

Expected behavior
The wrapper should also have a height of 900vh.

After further investigation the bug seems to be related rather to the last triggerLink when using anchors. Might be related to #4

This issue happens when combining anchors with factor={>1|<1}.

When the factor is bigger or smaller than 1 the last element had the wrong height, causing this issue. The wrapper height was correct. The issue is caused by the anchor targets.

This issue is already fixed locally and will be merged soon.

commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.