Skip to content

[Problem/Bug]: Tooltip gets stuck in case of two active browsers #5215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fvanheeswijk opened this issue Apr 24, 2025 · 8 comments
Closed

[Problem/Bug]: Tooltip gets stuck in case of two active browsers #5215

fvanheeswijk opened this issue Apr 24, 2025 · 8 comments
Assignees
Labels
bug Something isn't working regression Something used to work but doesn't anymore tracked We are tracking this work internally.

Comments

@fvanheeswijk
Copy link

What happened?

When two WebView2 browser windows are created within the same application, and you open (*) a tooltip in one window and then hover over another window which also opens a tooltip and then lose focus, then one of the two tooltips remains active on the screen on top of any other application, until the application itself is closed.

This is very annoying to our users as now they have tooltips floating on their screen as long as our application is active.

(*) A tooltip is in this case opened by hovering over an image with a title.

Importance

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

Runtime Channel

Prerelease (Edge Canary/Dev/Beta)

Runtime Version

136.0.3240.29

SDK Version

1.0.3179.45

Framework

Winforms

Operating System

Windows 11

OS Version

10.0.26100

Repro steps

This issue can be reproduced as follows with the included test project. Please also see the attached video showcasing the issue:

  1. Run the application and click twice on the 'Open WebView2 Form' button, this will open two forms containing WebView2 instances.
  2. Make sure these forms overlap.
  3. Activate the tooltip in the first form by hovering over the image.
  4. Now activate the tooltip in the second form by hovering over its image, note that the tooltip of the first form won't disappear.
  5. Lose the focus of these forms.
  6. Observe that the tooltip will remain in place on top of all other windows, until the application has been closed.

Image

using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.Web.WebView2.WinForms;

static class Program
{
    [STAThread]
    static void Main()
    {
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Environment.SetEnvironmentVariable("WEBVIEW2_RELEASE_CHANNEL_PREFERENCE", "1");
        Application.Run(new MainForm());
    }
}

public class MainForm : Form
{
    public MainForm()
    {
        var openWebViewButton = new Button
        {
            Text = "Open WebView2 Form",
            Dock = DockStyle.Fill,
            Font = new Font("Arial", 12, FontStyle.Bold),
            ForeColor = Color.White,
            BackColor = Color.DarkBlue,
            Padding = new Padding(10)
        };

        openWebViewButton.Click += (sender, e) =>
        {
            var webViewForm = new WebViewForm();
            webViewForm.Show();
        };

        Controls.Add(openWebViewButton);
        Text = "Main Form";
        StartPosition = FormStartPosition.CenterScreen;
        Size = new Size(300, 200);
        BackColor = Color.LightGray;
    }
}

public class WebViewForm : Form
{
    private readonly WebView2 webView;

    public WebViewForm()
    {
        Text = "WebView2 Form";
        StartPosition = FormStartPosition.CenterScreen;
        Size = new Size(800, 600);
        BackColor = Color.White;

        webView = new WebView2 { Dock = DockStyle.Fill };
        Controls.Add(webView);

        Load += async (sender, e) =>
        {
            await webView.EnsureCoreWebView2Async();
            webView.CoreWebView2.NavigateToString(@"
<html>
    <head>
        <title>Test</title>
    </head>
    <body>
        <svg width=""600"" height=""400"" xmlns=""http://www.w3.org/2000/svg"">
            <title>Image</title>
            <rect width=""600"" height=""400"" fill=""#d3d3d3"" />
        </svg>
    </body>
</html>"
            );
        };
    }
}

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

135.0.3179.85

@fvanheeswijk fvanheeswijk added the bug Something isn't working label Apr 24, 2025
@github-actions github-actions bot added the regression Something used to work but doesn't anymore label Apr 24, 2025
@fvanheeswijk
Copy link
Author

fvanheeswijk commented Apr 29, 2025

@sivMSFT Could you please ensure this issue is resolved before version 136 becomes the stable release? It's critical for us and our users that this problem does not make it into production, as it would significantly impact the user experience.

@sivMSFT
Copy link

sivMSFT commented Apr 29, 2025

@fvanheeswijk, we can't assure on that. But our team is looking into it and shall be reverting soon on it.

@ojasvi1450 ojasvi1450 added the tracked We are tracking this work internally. label Apr 30, 2025
@ojasvi1450
Copy link

@fvanheeswijk , the issue was also reproduced in latest edge 136,137 and Chromium as well. A fix has already been found. We'll update you once the fix is released for Webview2

@ojasvi1450
Copy link

Hi, it should be available with 136 by end of the coming week.

@ParadoxZero
Copy link

FYI - this is the chromium bug here - https://issuetracker.google.com/issues/414437602

@fvanheeswijk
Copy link
Author

@ojasvi1450 Is the fix live already? I just heard it also got into the stable build which is very unfortunate.

@jsteinfo
Copy link

jsteinfo commented May 8, 2025

This is significantly impacting my app's users as well due to mouseenter/mouseleave firing a large WPF Popup that covers part of the application. Users moving mouse from browser to WPF Popup is no longer firing mouseleave, so the Popup gets stuck covering the app until user mouses back over the browser into dead space.

@ParadoxZero
Copy link

The upstream fix is in version >= 136.0.3240.64

@dhveerap dhveerap closed this as completed May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Something used to work but doesn't anymore tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

7 participants