Skip to content

Clear the ComboBox pressed state when it loses pointer capture - #22428

Merged
MrJul merged 4 commits into
AvaloniaUI:mainfrom
Evan260:fix-combobox-stuck-pressed
Oct 21, 2026
Merged

MrJul merged 4 commits into
AvaloniaUI:mainfrom
Evan260:fix-combobox-stuck-pressed

Conversation

@Evan260

@Evan260 Evan260 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

What does the pull request do?

Clears the ComboBox's pressed state when it loses pointer capture.

What is the current behavior?

A ComboBox inside a panel with a ContextMenu or ContextFlyout keeps its :pressed state after a right click on it opens the menu. The popup takes the pointer, so the ComboBox never gets PointerReleased and stays looking pressed until it is clicked again.

What is the updated/expected behavior with this PR?

Losing pointer capture clears the state, so the ComboBox goes back to normal as soon as the menu opens.

Fixed issues

Fixes #21346

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

NuGet packages

The packages for this pull request have been published (workflow run):

@MrJul MrJul added bug backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch area-controls labels Oct 15, 2026
@MrJul
MrJul enabled auto-merge October 21, 2026 09:17
@MrJul
MrJul added this pull request to the merge queue Oct 21, 2026
Merged via the queue into AvaloniaUI:main with commit 565b1cf Oct 21, 2026
10 checks passed
@Evan260
Evan260 deleted the fix-combobox-stuck-pressed branch October 21, 2026 17:39
MrJul added a commit that referenced this pull request Nov 2, 2026
* Add test

* Fix

---------

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ComboBox stuck in pressed state when used in panel with contextflyout

3 participants