Skip to content

Commit 06c3e7f

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

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
@@ -64,6 +64,12 @@ function _doPlot(gd, data, layout, config) {
6464
// Events.init is idempotent and bails early if gd has already been init'd
6565
Events.init(gd);
6666

67+
// Add dummy event handler for 'wheel' event for Safari
68+
// to enable mouse wheel zoom
69+
// https://github.com/d3/d3/issues/3035
70+
// https://github.com/plotly/plotly.js/issues/7452
71+
d3.select(gd).on('wheel', function() {});
72+
6773
if(Lib.isPlainObject(data)) {
6874
var obj = data;
6975
data = obj.data;

0 commit comments

Comments
 (0)