Skip to content

Dragging a file from Explorer over top of a WebView2 in the application window will launch another process #9650

Open

Description

Describe the bug

I am working on a project that is basically an alternative to the Event Viewer MMC snap-in where we load evtx files and parse and display those events. Recently, I have noticed that dragging and dropping a .evtx files onto the application window is now launching an additional application process. If go into settings and change the .evtx extension default handler back to the Event View MMC then dragging and dropping a file onto the window will launch the Event Viewer MMC snap-in.

There have been no code changes to how we handle OnDrop or OnDragging and I have not been able to pinpoint any specific change around when this issue started. If I install a previous version of the app before the issue started then it does not repro but if I roll back to the commit tied to that release then I can reproduce the issue again. I have also tested previous .NET SDK versions with no success.

My suspicion is that it may be tied to the fix for the following issue that was recently resolved but do not have any hard evidence against this right now.
#7366

I have been able to reproduce this issue on a clean MAUI Hybrid project in VS 17.9.

Initially filed this over on the Maui repo but was recommended to bring this issue over here.
dotnet/maui#22556

Steps to reproduce the bug

  1. Create New Project > .NET MAUI Blazor Hybrid App
  2. Add the following to MainPage.xaml inside BlazorWebView
<BlazorWebView.GestureRecognizers>
    <DropGestureRecognizer AllowDrop="True" />
</BlazorWebView.GestureRecognizers>
  1. Run the app and drag a file over the window and 2 ghost icons will show up
    image
    Release the mouse button and the default application for the extension of the file being dragged will be launched. In the case of the above screen shot, dragging a .PML file over the window and releasing will launch procmon

Expected behavior

App should be able to handle this file via OnDrop and no other applications should be launched

Screenshots

No response

NuGet package version

None

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions