question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scroll event keeps firing

See original GitHub issue

Does not seem to respect infiniteScrollDistance setting. Is infiniteScrollDistance implented?

i have

<div #itemListViewWrapper infinite-scroll [infiniteScrollDistance]="1" (scrolled)="onScroll()">
    <item-component *ngFor="#item of itemListView" [item]="item"></item-component>
</div>

onScroll fires basically whenever i scroll regardless of distance bottom of the div to bottom of window changing it to 0 or 2 doesn’t matter

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zoehnetocommented, May 14, 2016

It turns out that in my case the issue was actually caused by a missing DOCTYPE declaration which leads to the output of documentElement.clientHeightand body.clientHeight being switched for compatibility with older websites as described here.

0reactions
justme1commented, Jul 2, 2016

@zoehneto amazing catch regarding missing DOCTYPE - I experienced the same issue!

@orizens , I suggest this one being updated and reflected in the README.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JQuery Scroll Event keeps firing when you scroll more
So I have a scroll event that fires when the user scrolls to a certain point on the site. It works until you...
Read more >
Scrolling event being fired too many times
As I said, it does the job, but, it's slow and has glitches while scrolling. I think it's because I am doing on...
Read more >
onscroll Event - W3Schools
The onscroll event occurs when an element's scrollbar is being scrolled. Tip: use the CSS overflow style property to create a scrollbar for...
Read more >
JavaScript Scroll Events, Event Throttling & Passive Events
The scroll event fires when you scroll a webpage or an element. For a page, the scrollX and scrollY properties return the number...
Read more >
The “scroll” event JavaScript Tutorial | window.onscroll
Learn about JavaScript's scroll event in this coding tutorial. I show you two ways to listen to scroll events and talk about why...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found