microsoft / microsoft/microsoft-ui-xaml

The ComboBox performs abnormally in the modal window

Open
#10,722 9 comments 1 reaction 0 assignees View on GitHub
bug needs-triage
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

In the modal window, the ComboBox sometimes cannot be clicked or selected.
Specifically, when clicking on a ComboBox, its appearance triggers a pressed state, but the dropdown list does not open, or when the dropdown list opens but the option inside is clicked, the appearance of the relevant option triggers a pressed state but cannot be selected.
When the above problem occurs, it needs to be repeatedly pressed several times to succeed. The probability of this problem occurring is high, but it is not 100% reproducible.

### Steps to reproduce the bug

1. Create a main window and a sub window
2. Place a button in the main window
3. Place a ComboBox in the sub window and set any data source
4. Instantiate child windows in the Click event of this button
5. The sub window is activated and displayed through the following methods
6. public void ShowDialog(Window owner)
{
SetWindowLongPtr64(Win32Interop.GetWindowFromWindowId(AppWindow.Id), -8, WindowNative.GetWindowHandle(owner));

var presenter = OverlappedPresenter.CreateForDialog();
presenter.IsModal = true;

AppWindow.SetPresenter(presenter);
AppWindow.Show();

Closed += (sender, args) => owner.Activate();
}
7. Click on the ComboBox to verify the issue

### Expected behavior

The ComboBox should respond to user operations normally

### Screenshots

_No response_

### NuGet package version

WinUI 3 - Windows App SDK 1.7.3: 1.7.250606001

### Windows version

Windows 11 (24H2): Build 26100

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. Start by reproducing the modal-window scenario with the provided ShowDialog(Window owner) method and a ComboBox, then trace the interaction path for opening the dropdown and selecting an option. Done means ComboBox operations work normally and reliably in the modal window.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
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.