microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

WebView2: Select text and scroll no longer works.

Open AdriaanLarcai opened this issue 1 year ago • 7 comments

Describe the bug

Selecting text in a Webview2 control, and while holding the left mouse button pressed, scrolling with the mouse wheel causes the app to freeze / mouse input to be lost.

Steps to reproduce the bug

Create a new Windows App SDK 1.4 Desktop application. Add a WebView2 control with a source where the text / content is larger than the control's viewspace. Select any visible text and, while holding the left mouse button pressed, scroll in any direction using the mouse wheel.

Expected behavior

The WebView2 control should scroll the content in the direction of the mouse wheel. This was working in a prior version.

Screenshots

No response

NuGet package version

Windows App SDK 1.4.3: 1.4.231115000

Packaging type

Packaged (MSIX), Unpackaged

Windows version

Windows 11 version 22H2 (22621, 2022 Update), Windows 11 version 21H2 (22000), Windows 10 version 22H2 (19045, 2022 Update), Windows 10 version 21H2 (19044, November 2021 Update), Windows 10 version 21H1 (19043, May 2021 Update), Windows 10 version 20H2 (19042, October 2020 Update), Windows 10 version 2004 (19041, May 2020 Update), Windows 10 version 1909 (18363, November 2019 Update), Windows 10 version 1903 (18362, May 2019 Update), Windows 10 version 1809 (17763, October 2018 Update)

IDE

Visual Studio 2022

Additional context

No response

AdriaanLarcai avatar Nov 20 '23 08:11 AdriaanLarcai

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Jan 11 '24 18:01 github-actions[bot]

We have the same problem, reported by all our users.

We have the latest stable sdk.

applefanbois avatar Feb 13 '24 15:02 applefanbois

@AdriaanLarcai, thank you for reporting this. I tested the scenario locally and text selection + mouse-wheel scroll + small control size is working well:

https://github.com/microsoft/microsoft-ui-xaml/assets/45051803/fe14f548-3654-4064-ad49-5ce5079f324e

This is with WinAppSDK 1.4.230913002 / WebView2Runtime 121.0.2277.128.

Resolving Not Repro. If you find you can still repro the issue, please comment here and provide a repro app / video. Thanks!

DmitriyKomin avatar Feb 22 '24 22:02 DmitriyKomin

Hi, perhaps my issue description was not clear enough. I will update it. But the issue is not selecting text and then scrolling. The issue is selecting text, and while still holding the left mouse button pressed, using the mouse wheel to scroll up and down. Users do this when they need to select more text than what's visible on screen. This is functionality that used to work, and no longer works.

AdriaanLarcai avatar Feb 23 '24 06:02 AdriaanLarcai

This is a techniques that a lot of power users use : scroll the mouse wheel while holding the left mouse button to select text across many pages not visible on screen.

applefanbois avatar Feb 23 '24 13:02 applefanbois

Thanks @AdriaanLarcai and @applefanbois. I am still not able to repro this - holding down left mouse button and scrolling with the wheel works well for me, even after updating to the same WinAppSDK 1.4.230913002 that you used (+ WebView2Runtime 121.0.2277.128). Can you attach a video of the repro that you are seeing?

DmitriyKomin avatar Feb 27 '24 22:02 DmitriyKomin

This issue is also being tracked on Edge side at MicrosoftEdge/WebView2Feedback#4291. Not clear yet if it's specific to WinAppSDK or an underlying Edge/CoreWebView2 issue, makes sense to keep both open for now. + @champnic, @tochukwuIbeEkeocha FYI.

DmitriyKomin avatar Feb 28 '24 00:02 DmitriyKomin