amcharts / amcharts3

JavaScript Charts V3
Other
395 stars 129 forks source link

An error appears in the Chrome (Version 73.0.3683.86 (Official Build) (64-bit)) console during scrolling #228

Open volodumurstroyuk opened 5 years ago

volodumurstroyuk commented 5 years ago

Error: "[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive." Perhaps the solution to the error described in this post https://developers.google.com/web/updates/2019/02/scrolling-intervention.

ruslanen commented 5 years ago

Same problem. Steps to reproduce:

  1. Open jsfiddle from demo (https://www.amcharts.com/demos-v3/column-with-rotated-series-v3/): http://jsfiddle.net/api/post/library/pure/
  2. Add property mouseWheelScrollEnabled and set to true (https://www.amcharts.com/docs/v3/reference/amserialchart/#mouseWheelScrollEnabled_property)
  3. Try mouse wheel and see: image

Solution:

document.addEventListener("mousewheel", d.handleWheel, {
   passive: false
}));

(Add passive: false to addEventListener for mousewheel, see: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)

martynasma commented 5 years ago

Just released a new version (3.21.15) which should fix the issue.