Skip to content

[Problem/Bug]: External File Drags are blocked while a modal dialog is open #5198

@JephDiel

Description

@JephDiel

What happened?

If a modal dialog is open, in my case a file selector, I don't get any drag events in the web layer when dragging a file into the window, either from the modal file selector itself, or my desktop/an explorer.exe window.

This is allowed in Electron, so this feature reduction could interfere with some users workflows.

Importance

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

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

135.0.3179.54

SDK Version

3116.0

Framework

Winforms

Operating System

Windows 11

OS Version

26100.3476

Repro steps

Using the WebView2WindowsFormsBrowser example, add:

window.addEventListener("dragenter", e => { alert("Drag Detected!") }); document.getElementById("openFile").addEventListener("click", e => { window.showOpenFilePicker(); })
to AppStartPage.js, and add:
<button id="openFile">Open File Selector</button>
to AppStartPage.html.

Then run the solution, click the "Open File Selector" button, and attempt to drag a file into the window and you won't see an alert.

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions