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 = {
60
60
} ;
61
61
62
62
/*
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
+ */
68
73
if ( typeof plotObj . addEventListener === 'function' ) {
69
- plotObj . addEventListener ( "wheel" , ( ) => { } ) ;
74
+ plotObj . addEventListener ( "wheel" , ( ) => { } , { passive : true } ) ;
70
75
}
71
76
72
77
return plotObj ;
You can’t perform that action at this time.
0 commit comments