Skip to content

Tooltip Direct Manipulation Fix #7417

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

Merged
merged 2 commits into from
Mar 10, 2023
Merged

Tooltip Direct Manipulation Fix #7417

merged 2 commits into from
Mar 10, 2023

Conversation

dipeshmsft
Copy link
Member

@dipeshmsft dipeshmsft commented Jan 6, 2023

Fixes #
#6319 #7002
Main PR

Description

When an app opens the tooltip directly, WPF ( independently ) also activates the tooltip ( marks it 'current; , registers handlers for Opened and Closed events , sets some internal properties and opens the tooltip ). Now, when app closes the tooltip directly, the closed event is raised.
Now, when the app re-opens the tooltip, WPF decides to dismiss the 'current' tooltip and while doing so, it uses the internal properties, which were unset by the closed event. Thus resulting in the error

In this fix,

  1. if WPF sees, that the tooltip is already open, we don't register an Opened handler, but do it's work immediately
  2. The closed handler ignores events raised from the "current" tooltip.
  3. Move unregistering handler in ClearServiceProperties

Customer Impact

Apps that do direct manipulation of tooltips can crash when run on .NET 6.0+

Regression

Yes, fixes compat regression

Testing

Tooltip Area Test pass , Ad-Hoc Testing with sample apps, New test cases added.

Risk

We don't know which real apps/libraries do direct manipulation of tooltips, how they do it, or how they interact with the built-in tooltip management. The examples we have seen some different ways of managing tooltips. And there may be cases that are still not handled with the fix.

Microsoft Reviewers: Open in CodeFlow

@dipeshmsft dipeshmsft requested a review from a team as a code owner January 6, 2023 12:03
@ghost ghost assigned dipeshmsft Jan 6, 2023
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jan 6, 2023
@ghost ghost requested a review from singhashish-wpf January 6, 2023 12:03
@dipeshmsft dipeshmsft merged commit 088d184 into release/7.0 Mar 10, 2023
@dipeshmsft dipeshmsft deleted the tooltip-ane-net7 branch March 10, 2023 04:09
@ghost ghost locked as resolved and limited conversation to collaborators Apr 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage Servicing-approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants