Skip to content
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

Horizontal scrolling with touchpad doesn't work in WebView2 #7772

Closed
2 tasks
aquinn39 opened this issue Sep 29, 2022 · 8 comments · Fixed by #8403
Closed
2 tasks

Horizontal scrolling with touchpad doesn't work in WebView2 #7772

aquinn39 opened this issue Sep 29, 2022 · 8 comments · Fixed by #8403
Labels
area-WebView bug Something isn't working product-winui2 team-Rendering Issue for the Rendering team working on it

Comments

@aquinn39
Copy link

Describe the bug

Trying to scroll a WebView2 web page horizontally with a touchpad does not work - it just scrolls vertically instead. Horizontal scrolling with touchpad works fine in Microsoft Edge so it should work in WebView2. Also, I tested horizontal scrolling with touch in WebView2 and that works fine.

Steps to reproduce the bug

  1. Add a WebView2 to a WinUI app
  2. Set the source of the WebView2
  3. Build and run the app, then attempt to scroll the web page horizontally with a touchpad

Expected behavior

The web page should scroll horizontally like in Microsoft Edge.

Screenshots

No response

NuGet package version

Microsoft.UI.Xaml 2.8.0

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

@aquinn39 aquinn39 added the bug Something isn't working label Sep 29, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Sep 29, 2022
@codendone codendone added area-WebView team-Rendering Issue for the Rendering team and removed needs-triage Issue needs to be triaged by the area owners labels Sep 30, 2022
@codendone
Copy link
Contributor

Looks like WebView2::HandlePointerWheelChanged() is failing to check if the wheel event is PointerPoint.Properties.IsHorizontalMouseWheel and just handles all of them as vertical wheel.

@Iucapad
Copy link

Iucapad commented Oct 14, 2022

I encounter this issue in a UWP application project using a WebView2 for it's main UI.
I hope it gets fixed at some point🤞

@vagisha-nidhi195
Copy link

@codendone Is there an update on this issue?

tjamesmac pushed a commit to tjamesmac/microsoft-ui-xaml that referenced this issue Apr 18, 2023
Adds check to mouse scrolling to see if horizontal scrolling is possible

Fix microsoft#7772
codendone pushed a commit that referenced this issue May 2, 2023
Adds check to mouse scrolling to see if horizontal scrolling is possible

Fix #7772

Co-authored-by: Thomas McAuliffe <[email protected]>
@Iucapad
Copy link

Iucapad commented May 2, 2023

Good job, thanks @tjamesmac !

@bpulliam
Copy link
Contributor

This fix will also be in WinUI 3 in the next servicing release.

@bpulliam
Copy link
Contributor

Fixed in 1.3.2

@aquinn39
Copy link
Author

Does anyone know if the fix is coming to WinUI 2?

@codendone
Copy link
Contributor

@aquinn39 Yes, a release of WinUI 2 is planned soon containing this fix.

kmahone pushed a commit that referenced this issue Jul 7, 2023
Adds check to mouse scrolling to see if horizontal scrolling is possible

Fix #7772

Co-authored-by: Thomas McAuliffe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-WebView bug Something isn't working product-winui2 team-Rendering Issue for the Rendering team working on it
Projects
None yet
5 participants