We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9ae845a + 4054a61 commit f4282e0Copy full SHA for f4282e0
src/lib/events.js
@@ -60,13 +60,18 @@ var Events = {
60
};
61
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
- */
+ * Add a dummy event handler for 'wheel' event for Safari
+ * to enable mouse wheel zoom.
+ * https://github.com/d3/d3/issues/3035
+ * https://github.com/plotly/plotly.js/issues/7452
+ *
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
+ */
73
if(typeof plotObj.addEventListener === 'function') {
- plotObj.addEventListener("wheel", () => {});
74
+ plotObj.addEventListener("wheel", () => {},{passive: true});
75
}
76
77
return plotObj;
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments