Visitar URL original
fix: Release the current ToolTip when it closes (backport #25137, #26096) (backport #26098) by mergify[bot] · Pull Request #26268 · unoplatform/uno · GitHub
Skip to content

fix: Release the current ToolTip when it closes (backport #25137, #26096) (backport #26098) - #26268

Merged
agneszitte merged 3 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-26098
Nov 10, 2026
Merged

agneszitte merged 3 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-26098

Conversation

@mergify

@mergify mergify Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue: closes unoplatform/kahua-private#565

PR Type:

🐞 Bugfix

What changed? 🚀

servicing/6.8 fix for the ToolTipService leak that #25137 fixes on master, together with the WinUI parity from #26096. #25137 also carries other ToolTip changes (#24592: popup parenting and DataContext) that servicing/6.8 does not have, so this is a standalone fix rather than a cherry-pick.

ToolTipService kept the last ToolTip it handled in its m_CurrentToolTip static after that ToolTip closed. A ToolTip references its owner, so once the owner left the visual tree the closed ToolTip still kept it alive, along with everything reachable from the owner's automation peer chain. It stayed rooted until another ToolTip took its place.

Changes

  • CloseToolTipImpl releases the ToolTip from the service, as WinUI's CancelAutomaticToolTip does. This also covers a pending ToolTip (hovered, not yet open). The show-duration timer closes through the same path.
  • Ported WinUI's m_bIsOpenAsAutomaticToolTip / s_bOpeningAutomaticToolTip. A ToolTip the service opened releases itself from the service when it closes by any other route (owner click, IsOpen = false). A ToolTip the app opens or closes is left to the app.
  • If the app opens the ToolTip itself while it waits to open, the service's timer no longer takes it over. In WinUI, OpenAutomaticToolTip's put_IsOpen(TRUE) changes nothing, so the service never holds that ToolTip. Before this change, the show-duration timer closed the app's ToolTip.

Testing

  • When_ToolTip_Closed_And_Owner_Removed_Then_Owner_Not_Rooted (rows: pending, owner removed, click, IsOpen = false): the owner is collected. All four rows fail on servicing/6.8 without the fix.
  • When_Automatic_ToolTip_Reopened_By_App_Then_ShowDuration_Does_Not_Close_It fails without the fix.
  • When_Pending_ToolTip_Opened_And_Closed_By_App_Then_Still_Opens_Automatically covers the parity: it is the test that fails on master after fix(tooltip): Let go of a ToolTip in the service when it closes, however it closed #25137. It opens and closes the ToolTip back to back, so it does not race the show delay. It also checks right away that the service still holds the pending ToolTip, using an internal ToolTipService.CurrentToolTipForTesting, as on master. It fails on that check if any close releases the ToolTip, which is master's behavior after fix(tooltip): Let go of a ToolTip in the service when it closes, however it closed #25137.
  • When_Pending_ToolTip_Opened_By_App_Then_ShowDuration_Does_Not_Close_It covers the app opening the ToolTip during the show delay. It fails without the fix.
  • Given_ToolTip passes 19/19 on Skia desktop (SamplesApp.Skia.Generic, net10.0).

PR Checklist ✅


This is an automatic backport of pull request #26098 done by [Mergify](https://mergify.com).

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@agneszitte
agneszitte merged commit e58d367 into release/stable/6.7 Nov 10, 2026
46 checks passed
@agneszitte
agneszitte deleted the mergify/bp/release/stable/6.7/pr-26098 branch November 10, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants