HandyOrg / HandyOrg/HandyControl

MessageBox unexpectedly restored the foreground window

Open
#1,342 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

https://github.com/HandyOrg/HandyControl/blob/8e707a66a92868ba63d6083e8953164f0f18f0e5/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs#L139

MessageBox在关闭的时候会恢复弹窗前的焦点窗口,这可能有点不是很合适。
如果弹窗显示过程中,用户切换到了其他程序,关闭弹窗会导致正在使用的程序丢失焦点。

Steps to reproduce the bug

NA

Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

Visual Studio 2022

Framework type

.Net Framework 4.7.2

Windows version

Windows 11 (22000)

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs at line 139 and inspect the window-focus behavior when MessageBox closes. Reproduce the case where the user switches to another application while the dialog is open; done means closing the dialog does not take focus away from the application the user switched to.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.