jnschulze / flutter-webview-windows

A WebView2-powered Flutter WebView implementation for the Windows platform.
BSD 3-Clause "New" or "Revised" License
203 stars 120 forks source link

enable scrolling with Trackpad #274

Closed hayashikun closed 8 months ago

hayashikun commented 9 months ago

I can scroll with the mouse wheel, but I cannot with the trackpad.

This is because scroll events from the trackpad are sent via onPointerPanZoomUpdate, not onPointerSignal. https://docs.flutter.dev/release/breaking-changes/trackpad-gestures

By sending the amount of scroll, panDelta in PointerPanZoomUpdateEvent, to the webview, I can scroll with the trackpad.

Related issues: https://github.com/jnschulze/flutter-webview-windows/issues/258

NotTsunami commented 8 months ago

This is a fantastic find. Hopefully it can get merged soon. Cheers!