Scroll inside div with overflow:scroll not firing
See original GitHub issueWhen using infinite-scroll it’s just firing when the body has scrolled, but not the actual div which is inside the body and may contains the infinite list.
Is it possible to select the element id which the infinite scroll listener should watch for?
<style>
.list{
overflow-x: hidden;
overflow-y: scroll;
height:90%;
}
</style>
<div class="list">
<div infinite-scroll (scrolled)="scroll()" *ngFor="let a of b">
<!-- ... -->
</div>
</div>
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
scroll() event not firing when attached to a div - Stack Overflow
"scroll" only works when the element is actually scrollable / scrolling. If you want scroll data regardless of element size, you can use...
Read more >.scroll() | jQuery API Documentation
A scroll event is sent whenever the element's scroll position changes, regardless of the cause. A mouse click or drag on the scroll...
Read more >Element: scroll event - Web APIs | MDN
The scroll event fires when an element has been scrolled. To detect when scrolling has completed, see the Element: scrollend event.
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 >Scroll Events and Intersection Observer - Beginner JavaScript
If it's the case of another element that has an overflow scroll set on it, like Wess has done in ... Even when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Damn, I’m so sorry, completely missed the scrollWindow attribute, thanks a lot, sorry!
I see. My issue was that I’ve attached the *ngFor list directly on the infinite-scroll item which doesn’t work in this case.