locomotivemtl / locomotive-scroll

🛤 Detection of elements in viewport & smooth scrolling with parallax.
https://locomotivemtl.github.io/locomotive-scroll
MIT License
7.97k stars 1.12k forks source link

Infinite Scroll Calculation when scrolling using keyboard #472

Open Rakha112 opened 2 years ago

Rakha112 commented 2 years ago

Hello 👋

Describe the bug i have a bug when scrolling using keyboard key (Home, End, Up or Down) the page always has class "has-scroll-scrolling" and the calculation never stops

To Reproduce Steps to reproduce the behavior:

  1. Go to this codesandbox
  2. Try scrolling using keyboard keys (Home, End, Up or Down)
  3. Look at the Status which is always Scrolling and the Y Value which is not round
  4. And look at the scroll bar that always appears

Thank you 👊

Rakha112 commented 2 years ago

i think this PR #469 fix this bug

RafaelKr commented 1 year ago

I noticed the same thing today. When adding the following code you can see it never stops logging events. Even when scrolling with the mouse again it still keeps logging after the scroll stopped.

scroll.on('scroll', (args) => {
    console.log(args)
});