microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

WebView2 hosted via CoreWebView2Controller is non-interactive on Windows 11 but works on Windows 10

Open DavidRufino opened this issue 2 months ago • 0 comments

Describe the bug

When hosting a WebView2 control in a WinUI 3 application by creating a CoreWebView2Controller and parenting it to the main window's HWND, the control is completely non-interactive on Windows 11. The web content renders correctly, but it does not respond to any mouse clicks, scrolling, or keyboard input. It behaves as if IsHitTestVisible is false, or as if a transparent window is layered on top of it.

This exact same code and application package works perfectly on Windows 10, where the WebView2 is fully interactive.

Steps to reproduce the bug

Create a new C# WinUI 3 project.

Create a CoreWebView2Environment and then a CreateCoreWebView2ControllerAsync, CoreWebView2Controller attached to the main window's HWND (CoreWebView2ControllerWindowReference.CreateFromWindowHandle).

Set the Bounds of the CoreWebView2Controller and update them on the AppWindow.Changed event.

Navigate the WebView2 to any URL (e.g., https://bing.com).

Run the application on a Windows 10 machine and observe that the webpage is interactive.

Run the exact same application on a Windows 11 machine.

Actual behavior

No response

Expected behavior

The WebView2 control should be fully interactive on Windows 11, allowing the user to click on links, scroll the page, and type in input fields, just as it does on Windows 10.

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.8.1: 1.8.250916003 Microsoft.Web.WebView2 1.0.3537.50

Windows version

Windows 11 (24H2): Build 26100 MicrosoftEdgeWebview2 v141.0.3537.71

Not reproducible in:

Windows 10 Pro (22H2), Build 19045.6332

DavidRufino avatar Oct 09 '25 22:10 DavidRufino