Ctrl+F in message text box no longer hijacked by TreeView filter (#873)#877
Ctrl+F in message text box no longer hijacked by TreeView filter (#873)#877RaoulJacobs wants to merge 1 commit intopaolosalvatori:mainfrom
Conversation
27b1362 to
cfe2206
Compare
|
Thank you @RaoulJacobs ! @claude, please check this pr |
|
Claude finished @ErikMogensen's task in 3m 30s —— View job PR Review
SummaryThis is a clean, minimal fix for a genuine UX issue. The approach is correct and well-structured. What the change does
Positive aspects
Minor suggestions1. Consider adding a
// src/ServiceBusExplorer/Forms/MainForm.cs:7751
if (GetFocusedControl(this) is FastColoredTextBoxNS.FastColoredTextBox)Other files that reference this type ( 2. Recursion terminates at non-
If ever a future layout change introduced a plain // No recursion needed; directly asks Windows which HWND has focus
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern IntPtr GetFocus();
private static Control GetFocusedControl() =>
Control.FromHandle(GetFocus());But VerdictLooks good to merge. The fix is correct for the app's current UI structure, well-scoped, and the test plan covers the meaningful cases. The suggestions above are cosmetic/informational. |
Summary
Fixes #873 —
Ctrl+Fpressed while the message body (FastColoredTextBox) has focus no longer redirects to the TreeView filter box.Root cause
ProcessCmdKeyinMainForminterceptedCtrl+Funconditionally, including when aFastColoredTextBox(message text, deadletter text) had focus.Fix
Added a
GetFocusedControlhelper that walks theContainerControlhierarchy to find the actual focused control. If it is aFastColoredTextBox, the key event is passed through to the control's native handler.Test plan