Skip to content

[Problem/Bug]: Mouse cursor stays invisible if it was invisible when the WebView is closed #5687

Description

@manuel-p-beko

What happened?

The update to runtime version 152 added a new feature to the WebView2. The Windows setting "Hide pointer while typing" is now supported. This is fine by itself, but there is a big problem:
If the window that contains the WebView2 control is closed while the mouse cursor is invisible, then the cursor will stay invisible for the whole application. Moving the mouse outside the application window shows the cursor, moving it inside hides it. The application is still fully functional, but it has an invisible cursor.
But it looks like this only happens if at least one other WebView2 control is active. If it was the only WebView2 control in the process, then the bug does not happen.

Edge 152 also added this "hide pointer" feature, but I can't reproduce the bug in Edge.

Here is a similar error report that I found: https://borncity.com/win/2026/09/02/edge-webview2-runtime-build-152-0-4191-53-no-mouse-pointer-in-the-veeam-br-console-or-care-center/
That doesn't specify that they close a windows while the cursor is invisible, so maybe there are more cases for when this bug happens.
I can confirm that the workaround mentioned there (forcing runtime version 151) also fixes the bug for me (because the cursor is never hidden while typing with runtim 151).

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

152.0.4191.53

SDK Version

1.0.4129.50 and 1.0.4191.47

Framework

WPF

Operating System

Windows 11

OS Version

26200.9106

Repro steps

  1. Open an application that shows a WebView2 control.
  2. Open a separate window in the application that also contains a WebView2 control.
  3. Type something in the WebView2 control so that the cursor is hidden.
  4. Close the window without moving the mouse - e.g. with Alt+F4.
    Important: Make sure that the mouse cursor stays outside the area of the WebView2 control from step 1. Entering that area will show it again.
  5. Notice that the mouse cursor stays hidden in the whole application area.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

Runtime 151.0.4129.107

Activity

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

Metadata

Metadata

Labels

bugSomething isn't workingregressionSomething used to work but doesn't anymore

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions