MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: External File Drags are blocked while a modal dialog is open
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WebView2WindowsFormsBrowser example and the repro changes to AppStartPage.js and AppStartPage.html. Reproduce the missing dragenter event while showOpenFilePicker() is open, then trace the WebView2 Windows Forms behavior around modal dialogs and external file drags. Done means the web layer receives the expected drag event in this scenario without regressing normal modal-dialog behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100