Repository navigation
Fix popups with pointer placement not resizing when their content grows - #22624
Merged
Merged
Conversation
The pointer position is now captured once per open and passed with the position request, so size and offset changes go through the positioner again without following the current pointer.
Member
|
@cla-avalonia comment |
Collaborator
|
maxkatz6
approved these changes
Oct 28, 2026
Contributor
Author
|
@cla-avalonia agree |
MrJul
enabled auto-merge
October 29, 2026 18:11
NuGet packagesThe packages for this pull request have been published (workflow run):
|
MrJul
added a commit
that referenced
this pull request
Nov 2, 2026
…ws (#22624) * Add failing tests for popups with pointer placement not resizing * Fix popups with pointer placement not resizing when their content grows The pointer position is now captured once per open and passed with the position request, so size and offset changes go through the positioner again without following the current pointer. --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
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.
What does the pull request do?
Fixes a 12.1.4 regression from #22366: a popup with
PlacementMode.Pointer(aContextMenuopened by right click, or a flyout shown at the pointer) no longer resizes when its content grows after it opens, so the content gets clipped.What is the current behavior?
After the first arrange,
PopupRoot.ArrangeSetBoundsskipsUpdatePosition()for pointer placement. That call is also what resizes the platform popup, soClientSizekeeps its first value.What is the updated/expected behavior with this PR?
The popup resizes to fit its content again and stays anchored at the pointer position from when it opened, as #22366 intended. Reopening it uses the new pointer position. Behavior change: offset changes and nested pointer popups now keep the original anchor instead of jumping to the current pointer.
How was the solution implemented (if it's not obvious)?
Instead of skipping updates,
Popupcaptures the pointer position once per open and passes it onPopupPositionRequest, andPopupPositionerExtensions.Updateuses it instead of the current pointer. This also covers overlay popups, which the old check did not. The_hasInitialPositioncheck is removed. No public API changes.Checklist
Breaking changes
None.
Obsoletions / Deprecations
None.
Fixed issues
Fixes #22573