dotnet / dotnet/wpf

Modal dialog on top of non-modal window sends main window to back

Open
#2,904 3 comments 3 reactions 0 assignees View on GitHub
Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: .NET 4.7
* Windows version: win10
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No

**Problem description:**
Modal dialog on top of non-modal window sends main window to back. Ie, when we close a child window its Owner gets send back (we lost focus)

**Actual behavior:**
The parent window lost focus after closing a child window after closing a modal.

**Expected behavior:**
No matter if a modal dialog has been shown before, if a user closes a child window, the parent window should stay visible.

**Minimal repro:**
Here is the problem and some source code to reproduce: https://stackoverflow.com/questions/10757625/why-does-closing-the-last-child-window-minimize-its-parent-window

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.