Skip to content

Commit 68f04da

Browse files
committed
add dummy 'wheel' event handler to enable scroll zoom on safari
1 parent bf6909b commit 68f04da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/plot_api/plot_api.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,6 +3663,12 @@ function makePlotFramework(gd) {
36633663
var gd3 = d3.select(gd);
36643664
var fullLayout = gd._fullLayout;
36653665

3666+
// Add dummy event handler for 'wheel' event for Safari
3667+
// to enable mouse wheel zoom
3668+
// https://github.com/d3/d3/issues/3035
3669+
// https://github.com/plotly/plotly.js/issues/7452
3670+
gd3.on('wheel', function() {});
3671+
36663672
fullLayout._calcInverseTransform = calcInverseTransform;
36673673
fullLayout._calcInverseTransform(gd);
36683674

0 commit comments

Comments
 (0)