WebView2Feedback icon indicating copy to clipboard operation
WebView2Feedback copied to clipboard

[Problem/Bug]: Drag and drop locks up control

Open simon-knuth opened this issue 9 months ago • 3 comments

What happened?

Dragging a page element such as an image or some highlighted text in a WinUI 3 app severely misbehaves, causing the WebView2 control to stop responding to mouse input until clicked. Doing this multiple times can cause the control to lock up indefinitely.

This bug has been present for at least a year. The first report I could find of it is https://github.com/microsoft/microsoft-ui-xaml/issues/9187 in the WinUI repo, which includes some great repro steps and a video demo. It has never been acknowledged, so I am raising the issue here in hopes of getting it fixed. The bug is preventing important functionality such as dragging emails to another folder in Microsoft Outlook.

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

No response

Framework

WinUI3/WinAppSDK

Operating System

Windows 11

OS Version

26120.3360

Repro steps

  1. Drag an element, e.g. an image or highlighted text. Observe nothing happening during the drag and the mouse pointer not changing. The control stops processing pointer input.
  2. Click somewhere on the WebView2. Observe a file icon corresponding to the dragged content's type appearing at the pointer's position and getting stuck there. The displayed mouse pointer is still wrong, but the control is processing pointer input correctly again.
  3. Click the WebView2 again. Observe the file icon disappearing and the control returning to a normal state.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

simon-knuth avatar Mar 06 '25 16:03 simon-knuth

Hi @simon-knuth,

The drag and drop feature was introduced in version 1.0.3079-prerelease as an experimental API. Could you confirm if you're experiencing issues specifically when using this API?

Looking forward to your insights!

sivMSFT avatar Mar 07 '25 04:03 sivMSFT

This issue is not related to the new DragStarting event (if I'm not mistaken, this specific experimental API isn't even available for WinUI3 apps at the moment). Nevertheless, I can still reproduce this if I update to the latest experimental WebView2 SDK 1.0.3116-prerelease and initialize the control with the 136.0.3181.0 WebView2 runtime that's currently in the Canary channel.

simon-knuth avatar Mar 07 '25 22:03 simon-knuth

There is some work we are doing at our part to support this. Dragging in webview2 in winui3 is not supported yet. We will update once its done

Navdeep-ss avatar Mar 25 '25 07:03 Navdeep-ss