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.

Consider marking event handler as 'passive' to make the page more responsive

See original GitHub issue

Hi:

I was using Chrome version: Version 55.0.2883.75 beta (64-bit) with react-waypoint and noticed the following warning message when I scroll with the mouse wheel:

image

I wonder if this warning would go away if we add the wheel event listener with the { passive: true } flag in react-waypoint?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
lencionicommented, Dec 14, 2016

Close, but not quite. The idea behind consolidated-events is to combine multiple event handlers for the same event type on the same node into a single event handler. So, if you add multiple scroll events to the same node, it should only add one. It will not consolidate different types of event handlers (e.g. scroll and resize) into a single one. That is not possible.

Secondarily, it allows you to use options like the passive option without having to worry about browser compatibility.

0reactions
joyfulelementcommented, Dec 14, 2016

Thanks for the clarifications @lencioni , really learnt a lot today.

For the original issue with wheel event, I’ve posted a stackoverflow question to follow it up separately. Perhaps we can get some answers from there from the community. Thanks again for all the follow ups.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consider marking event handler as 'passive' to make the page ...
Passive event listeners are a new feature in the DOM spec that enable developers to opt-in to better scroll performance by eliminating the...
Read more >
[Violation] Added non-passive event listener to a ... - GitHub
... Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.
Read more >
Passive event listeners - Medium
Consider marking event handler as 'passive' to make the page more responsive. you should use the passive option in .
Read more >
Passive event warnings [63211698] - Visible to Public
Consider marking event handler as 'passive' to make the page more responsive. Well I considered it and determined that I can't.
Read more >
Consider marking event handler as 'passive' to make the page ...
jQuery : Consider marking event handler as 'passive' to make the page more responsive [ Beautify Your Computer ...
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