Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. #4351

Closed
asimkt opened this issue Jun 8, 2017 · 2 comments

Comments

@asimkt
Copy link

asimkt commented Jun 8, 2017

Expected Behavior

Chart.JS should be optimized for performance

Current Behavior

Chrome throws warning
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. on L#5755

Possible Solution

Change
node.addEventListener(eventType, method); to
node.addEventListener(eventType, method. {passive: true});

Steps to Reproduce (for bugs)

  1. Create a chart and check the console.

Environment

  • Chart.js version: 2.6.0
  • Browser name and version: Chrome 58.0.3029.81
@etimberg
Copy link
Member

etimberg commented Jun 8, 2017

Closing as duplicate of #4287. I'm happy to look at a PR fixing this.

@etimberg etimberg closed this as completed Jun 8, 2017
@asimkt
Copy link
Author

asimkt commented Jun 9, 2017

@etimberg Oh.. I've searched for the error message. I thought it's not been reported yet. Let me try to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants