microsoft / microsoft/microsoft-ui-xaml

Using ENTER in the application's sysmenu is triggerring in-app actions

Open
#10,732 2 comments 1 reaction 0 assignees View on GitHub
area-TitleBar area-Windowing bug team-Core
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

Pressing the ENTER key in one of the entry of the window's system menu is also triggering the action associated to the focused XAML element.

### Steps to reproduce the bug

1. Launch the WinUI 3 gallery application
2. Open the "Button" page
3. Focus one of the sample button
4. Press ALT+SPACE to open the window's system menu
5. Highlight the maximize entry
6. Press ENTER

### Actual behavior

The window is maximized _and_ the button is pressed.
We can see the "You clicked: Button1" message in the sample output.

### Expected behavior

The window is maximized *and* the button is *not* pressed.

### Screenshots

![Image](https://github.com/user-attachments/assets/d2f9eae0-e3a8-400e-802f-e02446f5d223)

### NuGet package version

WinUI 3 - Windows App SDK 1.7.3: 1.7.250606001

### Windows version

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the WinUI 3 Gallery application's Button page by focusing a sample button, opening the window system menu with Alt+Space, and activating Maximize with Enter. Trace the relevant window system-menu and XAML keyboard handling entry points; done means the window maximizes without also invoking the focused button action.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.