File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,18 @@ var Events = {
6060 } ;
6161
6262 /*
63- * Add a dummy event handler for 'wheel' event for Safari
64- * to enable mouse wheel zoom.
65- * https://github.com/d3/d3/issues/3035
66- * https://github.com/plotly/plotly.js/issues/7452
67- */
63+ * Add a dummy event handler for 'wheel' event for Safari
64+ * to enable mouse wheel zoom.
65+ * https://github.com/d3/d3/issues/3035
66+ * https://github.com/plotly/plotly.js/issues/7452
67+ *
68+ * We set {passive: true} for better performance
69+ * and to avoid a Violation warning in Chromium.
70+ * https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
71+ * https://github.com/plotly/plotly.js/issues/7516
72+ */
6873 if ( typeof plotObj . addEventListener === 'function' ) {
69- plotObj . addEventListener ( "wheel" , ( ) => { } ) ;
74+ plotObj . addEventListener ( "wheel" , ( ) => { } , { passive : true } ) ;
7075 }
7176
7277 return plotObj ;
You can’t perform that action at this time.
0 commit comments