Skip to content

Fix the focus issue of SmartTag/DropDown by preserving the modal menu tracking of ToolStripDropDown.#14606

Open
LeafShi1 wants to merge 1 commit into
dotnet:mainfrom
LeafShi1:Fix_14600_SmartTag_dialog_doesn't_disappear
Open

Fix the focus issue of SmartTag/DropDown by preserving the modal menu tracking of ToolStripDropDown.#14606
LeafShi1 wants to merge 1 commit into
dotnet:mainfrom
LeafShi1:Fix_14600_SmartTag_dialog_doesn't_disappear

Conversation

@LeafShi1
Copy link
Copy Markdown
Member

@LeafShi1 LeafShi1 commented Jun 3, 2026

Fixes #14600

Root Cause

PR #14491 tightened ToolStrip focus handling to avoid accidental menu activation for normal tab navigation.
The new logic worked for regular ToolStrip, but it also affected ToolStripDropDown scenarios (including SmartTag-hosted UI):

  1. On focus transitions, modal menu tracking was gated too aggressively.
  2. On kill-focus, active ToolStrip/menu mode could be cleared too early for drop-down hosts.
  3. Once menu mode exited prematurely, the expected auto-dismiss behavior on subsequent UI navigation (such as tab switching) could break.

Proposed changes

Customer Impact

  • The SmartTag dialog can be exited normally when switch the TabPage items

Regression?

  • Yes

Risk

  • Minimal

Screenshots

Before

The SmartTag dialog doesn't disappear when switch the Tabpage items

Actual11.mp4

After

The SmartTag can be closed normally when switching the TabPage items

AfterChanges.mp4

Test methodology

  • Manualy

Test environment(s)

  • .net 11.0.0-preview.5.26258.110
Microsoft Reviewers: Open in CodeFlow

Copy link
Copy Markdown
Member

@SimonZhao888 SimonZhao888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DemoConsole app: The SmartTag dialog doesn't disappear when switch the Tabpage items

2 participants