Skip to content

Position popup using the screen containing the anchor point - #21750

Merged
MrJul merged 1 commit into
AvaloniaUI:mainfrom
MrJul:fix/popup-edge-placement
Jul 11, 2026
Merged

Position popup using the screen containing the anchor point#21750
MrJul merged 1 commit into
AvaloniaUI:mainfrom
MrJul:fix/popup-edge-placement

Conversation

@MrJul

@MrJul MrJul commented Jul 10, 2026

Copy link
Copy Markdown
Member

What does the pull request do?

This PR ensures that popups are positioned on the screen containing their anchor point by default.
Before this PR, the screen containing the top-left point of the anchor rect was always used, resulting in unexpected placements (see #15261).

This PR only changes the default position before gravity or constraints are applied.

Unit tests have been added.
(Apparently, we didn't have any unit tests for ManagedPopupPositioner before, so we might as well start now.)

Fixed issues

Fixes #15261

@MrJul MrJul added bug backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch customer-priority Issue reported by a customer with a support agreement. labels Jul 10, 2026
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0067418-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul
MrJul added this pull request to the merge queue Jul 11, 2026
Merged via the queue into AvaloniaUI:main with commit 3bdc149 Jul 11, 2026
11 checks passed
@MrJul
MrJul deleted the fix/popup-edge-placement branch July 11, 2026 07:15
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported-12.1.x bug customer-priority Issue reported by a customer with a support agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu popup opens in top monitor when using vertical monitor setup

3 participants