Chart.js: [BUG] Violation warnings in verbose level chrome dev tools logging

Created on 25 May 2017  路  6Comments  路  Source: chartjs/Chart.js

Expected Behavior

Expect Chart.js to not cause logs in dev console

Current Behavior

touchstart and touchend event listeners log verbose level [Violation] messages (see below).

Possible Solution

addEventListener can now take a map {"passive": "true"} see the MDN entry

Steps to Reproduce (for bugs)

  1. Go to the unedited codepen: https://codepen.io/pen?template=JXVYzq
  2. Open chrome dev tools console and set log level to verbose
  3. Refresh page
  4. See verbose log in console: [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. Chart.bundle.min.js:14

Context

It's helpful to have verbose logging turned on in development because chrome will warn you when javascript execution locks up the browser. Having Chart.js warnings comingled with application logs reduces signal to noise.

Environment

  • Chart.js version: tried in 2.0/2.5/2.6
  • Browser name and version: Chrome OSX Version 58.0.3029.110 (64-bit)
help wanted bug

Most helpful comment

When will this be released? It seems like quite a long time between that fix and the release..

All 6 comments

I'm happy to look at a PR for this

+1

+1

When will this be released? It seems like quite a long time between that fix and the release..

+1

Very soon: #4706

Was this page helpful?
0 / 5 - 0 ratings