From eb5394d85c59907442f3aa17f0306916c0bbb57c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 25 Nov 2025 02:20:58 +0000 Subject: [PATCH 1/2] Initial plan From 47145102682521f9fb89ada5d5ea0d78016bf9a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 25 Nov 2025 02:26:36 +0000 Subject: [PATCH 2/2] Fix ToolStripMenuItem character input issue in DemoConsole by checking IsInDesignMode Co-authored-by: LeafShi1 <132890443+LeafShi1@users.noreply.github.com> --- .../System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs b/src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs index 893d5ad4c31..003b2b7326f 100644 --- a/src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs +++ b/src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs @@ -4586,7 +4586,12 @@ protected override void WndProc(ref Message m) SnapFocus((HWND)(nint)m.WParamInternal); // For fix https://github.com/dotnet/winforms/issues/12916 - ToolStripManager.ModalMenuFilter.SetActiveToolStrip(this); + // Skip this in design mode to avoid modal menu mode intercepting keyboard input + // which would prevent typing in the design surface (e.g., DemoConsole). + if (!IsInDesignMode) + { + ToolStripManager.ModalMenuFilter.SetActiveToolStrip(this); + } } if (!AllowClickThrough && m.MsgInternal == PInvokeCore.WM_MOUSEACTIVATE)