d4nyll/smartscroll

Screen jumps unexpectedly

Opened this issue · 0 comments

I was experiencing a bug where the screen would jump to the top of the screen if the scrolling sections were over, and the section coming after was not bigger than the screen's height.

I fixed the issue by adding the check
if(typeof sections[sectionIndexAtWindowMiddle] !== 'undefined')
in the bindScroll function on line 331.

Hope this can help out.