Skip to content

[Problem/Bug]: Drag and Drop within a WebView blocks mouse clicks if HostInputProcessing is enabled #5613

@davidthede

Description

@davidthede

What happened?

Dragging and dropping text within a WebView blocks the WebView from responding to mouse clicks when (a) HostInputProcessing is enabled, and (b) AllowExternalDrop is enabled.

To reproduce with the WebView2APISample (unmodified),

(1) Click Window > WebView Creation Mode > Windowed - HostInputProcessing
(2) Click Window > Create WebView
(3) Click and drag to select some text
(4) Drag and drop inside the WebView2
(5) Try clicking with the mouse inside the WebView2

Expected: after clicking, the selection should go away and you should be able to select other text
Actual: the selection does not change and you cannot cancel the selection or select anything else.

To prevent the problem, turn AllowExternalDrop off.

I was also able to reproduce the identical behavior in the WPF sample.

This is similar to but not necessarily the same as this issue:
#5141

In this case, there does not appear to be a way to restore normal operation of the WebView, and a single drag and drop operation within the control is enough to trigger the problem.

This is with version: 148.0.3967.83

Importance

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

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

148.0.3967.83

SDK Version

1.0.4015-prerelease

Framework

Win32

Operating System

Windows 11

OS Version

26200.8457

Repro steps

To reproduce with the WebView2APISample (unmodified),

(1) Click Window > WebView Creation Mode > Windowed - HostInputProcessing
(2) Click Window > Create WebView
(3) Click and drag to select some text
(4) Drag and drop inside the WebView2
(5) Try clicking with the mouse inside the WebView2

Expected: after clicking, the selection should go away and you should be able to select other text
Actual: the selection does not change and you cannot cancel the selection or select anything else.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions