Skip to content

Add dummy 'wheel' event handler to enable scroll zoom on safari #7474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 18, 2025
6 changes: 6 additions & 0 deletions src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ function _doPlot(gd, data, layout, config) {
// Events.init is idempotent and bails early if gd has already been init'd
Events.init(gd);

// Add 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
d3.select(gd).on('wheel', function() {});

if(Lib.isPlainObject(data)) {
var obj = data;
data = obj.data;
Expand Down
Loading