ES6 onScroll never fires
See original GitHub issueI’ve been trying this out and I can’t seem to get it working.
export default class MyPage extends React.Component {
render () {
return <div className='page-wrapper'
onWheel={(e)=>console.log('WHEEL!!',e)}
onScroll={(e)=>console.log('SCROLL!!',e)}>
{... my page content ...}
</div>;
}
}
the onWheel fires normally, but the onScroll is not firing. I dunno if I’m missing something or this is a bug.
Thanks!
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:20 (4 by maintainers)
Top Results From Across the Web
React/ES6 onScroll event not getting triggered - Stack Overflow
I have an onScroll event in my render function. When the site is scrolled it should trigger the listenScrollEvent function which outputs ...
Read more >[Solved]-React/ES6 onScroll event not getting triggered-Reactjs
Coding example for the question React/ES6 onScroll event not getting triggered-Reactjs. ... Why React event handler is not called on dispatchEvent?
Read more >Document: scroll event - Web APIs - MDN Web Docs - Mozilla
The scroll event fires when the document view has been scrolled. To detect when scrolling has completed, see the Document: scrollend event.
Read more >Cant fire scroll event on react - The freeCodeCamp Forum
I have a submenu element, which appears when the user hovers over a menu item, and hides when(well you can guess when).
Read more >JavaScript Scroll Events, Event Throttling & Passive Events
When you scroll a document or an element, the scroll events fire. You can trigger the scroll events in the following ways, for...
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 Free
Top 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
@ddaza Add a
true
to the end of thatwindow
listener to enable capture mode.@admiral96 there are problems with the code you posted, but this a bug tracker not a Q&A - you’ll find better help on StackOverflow or something similar.