Skip to content

Commit

Permalink
Fix Scrolling on Firefox
Browse files Browse the repository at this point in the history
This fixes the issue: belucha#18

Add the event "onwheel", infos could be found here: https://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
  • Loading branch information
Apflkuacha authored Mar 13, 2024
1 parent 4c18965 commit 61b3895
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OxyPlot.Blazor/BlazorPlotView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ protected override void BuildRenderTree(RenderTreeBuilder builder)
AddEventCallback<MouseEventArgs>(builder, 10, "onmousemove", e => ActualController.HandleMouseMove(this, TranslateMouseEventArgs(e)));
AddEventCallback<MouseEventArgs>(builder, 11, "onmouseenter", e => ActualController.HandleMouseEnter(this, TranslateMouseEventArgs(e)));
AddEventCallback<MouseEventArgs>(builder, 12, "onmouseleave", e => ActualController.HandleMouseEnter(this, TranslateMouseEventArgs(e)));
AddEventCallback<WheelEventArgs>(builder, 13, "onwheel", e => ActualController.HandleMouseWheel(this, TranslateWheelEventArgs(e)), preventDefault: false);
AddEventCallback<WheelEventArgs>(builder, 13, "onmousewheel", e => ActualController.HandleMouseWheel(this, TranslateWheelEventArgs(e)), preventDefault: false);
AddEventCallback<KeyboardEventArgs>(builder, 14, "onkeydown", HandleKeyDownEvent, preventDefault: _preventKey, addAlways: true);
}
Expand Down Expand Up @@ -541,4 +542,4 @@ public ValueTask DisposeAsync()
}
return _resizeObserver?.DisposeAsync() ?? ValueTask.CompletedTask;
}
}
}

0 comments on commit 61b3895

Please sign in to comment.