dotnet / dotnet/wpf

WPF application with WebView2 clicking on the browser area while loading the application hangs the WinProc but only on Windows 10

Open
#10,935 1 comment 0 reactions 0 assignees View on GitHub
Investigate
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/WPF-application-with-WebView2-clicking-o/10919246)._

---
[severity:I'm unable to use this version]
I have a windows application with the following layout (basically just a webview2).

In windows 10 IOT OS, if the user clicks on the webview2 browser area while the webpage is loading then the winproc gets blocked and won't return to working until you place another application in the foreground. Putting the application in a state where user interaction (any keyboard or mouse events) are blocked. This is a major problem since we plan to use our application in a Kisok mode so users won't be able to launch other applications to workaround this. While it 'might' be unlikely that users will click on the screen at startup they very well could.

The xaml for our app is very simple and is shown in the following:

```




```

I've experimented with various workarounds such as:
a) At the end of the constructor MainWindow()
> webView.Visibility = Visibility.Collapsed;

b) then in WebView_NavigationCompleted()
> webView.Visibility = Visibility.Visible;

But this type of workaround (and others I've tried) we've experienced consistent crashes with event viewer details such as:
>Application: TechLiveIsa.exe
>Framework Version: v4.0.30319
>Description: The application requested process termination through System.Environment.FailFast(string message).
>Message: Unrecoverable system error.
>Stack:
> at System.Environment.FailFast(System.String)
> at MS. Internal.TextFormatting.LineServicesCallbacks.GetCharCompressionInfoFullMixed(IntPtr, MS. Internal.TextFormatting.LsDevice, MS. Internal.TextFormatting.LsTFlow, MS. Internal.TextFormatting.LsCharRunInfo*, MS. Internal.TextFormatting.LsNeighborInfo*, MS. Internal.TextFormatting.LsNeighborInfo*, Int32, Int32**, Int32**)

And:

> Faulting application name: TechLiveIsa.exe, version: 2.1.25.0, time stamp: 0xd269c319
>Faulting module name: PresentationCore.ni.dll, version: 4.8.4777.0, time stamp: 0x6758f7e6
>Exception code: 0x80131623
>Fault offset: 0x0000000000ac3907
>Faulting process id: 0x538
>Faulting application start time: 0x01dbd804d43647c8
>Faulting application path: C:\Program Files (x86)\TechLiveISA\TechLiveIsa.exe
>Faulting module path: C:\Windows\assembly\NativeImages_v4.0.30319_64\PresentationCore\8cd0c2f75be284b1152b9340841a7274\PresentationCore.ni.dll
>Report Id: b0c120c0-3469-4512-9c49-4b338be4cc52
>Faulting package full name:
>Faulting package-relative application ID:

---
### Original Comments

#### Feedback Bot on 10/6/2025, 09:34 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.