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.

Passive Listener Violation In Chrome

See original GitHub issue
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.

Our event dispatcher always attaches this events, regardless if they are used or not: https://github.com/emberjs/ember.js/blob/master/packages/ember-views/lib/system/event_dispatcher.js#L62-L65

We should most likely lazily install them as they are required.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
btecucommented, Jan 31, 2019

@pixelhandler this is still an issue with the latest version: image

3reactions
krisseldencommented, Jun 9, 2017

@wellington1993 you can remove events via https://emberjs.com/api/classes/Ember.Application.html#property_customEvents and if your app needs these events use passive listeners for mousewheel, touchstart, touchmove (only events that can block scroll via preventDefault matter for passive listening), you add on didInsertElement and remove on willDestroyElement of a component.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bing maps violation in Chrome (non-passive event listener to ...
Consider marking event handler as 'passive' to make the page more responsive. It makes any website having any map refresh slower and slower....
Read more >
Warning: Added non-passive event listener to a scroll ...
This question already has an answer here:​​ [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider ...
Read more >
Easy fix for: Unable to preventDefault inside passive event ...
This violation is about the javascript Event Listeners. Since Chrome 51, an event listener can be set as "passive". Passive event listeners ...
Read more >
Non-passive event listener warning in Chrome console - v6
I am using React with a custom component to mount/unmount CodeMirror to the page. I don't think that would be the issue, but...
Read more >
Passive event listeners - Medium
chrome shows a warning in the console: [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking ...
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