Skip to content

Fix menu auto closing when reopened - #22399

Merged
MrJul merged 2 commits into
AvaloniaUI:mainfrom
MrJul:fix/menu-close-timer
Oct 23, 2026
Merged

MrJul merged 2 commits into
AvaloniaUI:mainfrom
MrJul:fix/menu-close-timer

Conversation

@MrJul

@MrJul MrJul commented Oct 7, 2026

Copy link
Copy Markdown
Member

What does the pull request do?

This PR fixes a menu automatically closing if it's reopened using the keyboard while its close timer is still active.

For example, using the mouse, quickly open a menu, then a submenu, then close everything.
Now, open the menu and submenu again, using the keyboard this time.

If all the steps above were done during the MenuShowDelay (400ms), the submenu is incorrectly closed.
The above was found using automation tests. It's unlikely that a user is fast enough to trigger this with the default delay.

@MrJul MrJul added bug backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

NuGet packages

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

@MrJul MrJul added the team label Oct 19, 2026
@MrJul
MrJul added this pull request to the merge queue Oct 23, 2026
Merged via the queue into AvaloniaUI:main with commit 6a25cf4 Oct 23, 2026
11 checks passed
@MrJul
MrJul deleted the fix/menu-close-timer branch October 23, 2026 13:51
MrJul added a commit that referenced this pull request Oct 28, 2026
* Add failing tests for reopened menu

* Fix menu auto closing when reopened

(cherry picked from commit 6a25cf4)
MrJul added a commit that referenced this pull request Nov 2, 2026
* Add failing tests for reopened menu

* Fix menu auto closing when reopened
@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.

2 participants