fix: reuse tooltip instance for composite components#9639
Merged
Conversation
Store the cached tooltip on the innermost component so the write in forComponent matches the lookup in getForElement, which already resolves the innermost component. Without this, composites stored the tooltip on the composite but read it from the content component, creating a new instance on every call. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vursen
approved these changes
Jun 30, 2026
|
Collaborator
|
Hi @web-padawan and @web-padawan, when i performed cherry-pick to this commit to 25.1, i have encountered the following issue. Can you take a look and pick it manually? |
web-padawan
added a commit
that referenced
this pull request
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Tooltip instances should be reused when calling
Tooltip.forComponentrepeatedly for the same component, as introduced in #4736. This did not work for composite components: the tooltip was stored on the original component, but the lookup inTooltip#getForElementresolves the innermost content component instead, so the cached instance was never found and a new one was created on every call.Store the cached tooltip on the innermost component in
forComponent, so the write matches the read ingetForElement(and the existingforHasTooltip, which already resolves the innermost component).Fixes #9638
🤖 Generated with Claude Code