dotnet / dotnet/wpf

WPF WebBrowser tooltips broken when moving control to new window

Open
#3,986 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/idea/1165857/wpf-webbrowser-tooltips-broken-when-moving-control.html)._

---
[severity:I'm unable to use this version of Visual Studio]
Hi, I don't think this is necessary an issue with Visual Studio since this was first discovered by a QAer, so my apologies if this isn't the right place to submit the bug. Anyway...

The WPF WebBrowser control has an issue where HTML tooltips stop working. It only happens when the control is created in one window, moved to another, and the old window is closed. We are doing this because we are embedding a single-page application, so it's not possible to simply create a new WebBrowser and lose the state of the existing HTML document.

I've attached a solution to reproduce the issue, which can be done with the following steps:
1. Click the **Navigate in Window** button. This creates and navigates the browser in a new window.
2. Hover over some HTML that has a tooltip. Yes, this is odd, but it is necessary to reproduce.
2. Close the new window
3. Click the **Move to Window** button. This moves the browser to a new window. At this point, you should see that tooltips are broken.

To elaborate more, it appears that whatever window you first viewed tooltips in becomes some kind of lifeline to the WebBrowser. if you keep that window open, you can still see tooltips in new windows, but once that window is closed, tooltips stop working. You can repro this with the solution since none of the windows are modal.

---
### Original Comments

#### Feedback Bot on 8/26/2020, 11:12 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.

#### Feedback Bot on 8/28/2020, 02:22 AM:

We have converted this feedback item from problem to idea. This change was done to better reflect the feedback's nature.
#### Feedback Bot on 8/28/2020, 04:25 PM:

Thank you for taking the time to provide your suggestion.  We will do some preliminary checks to make sure we can proceed further.  We'll provide an update once the issue has been triaged by the product team.

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.