Skip to content

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

Merged
LeafShi1 merged 1 commit into
dotnet:mainfrom
LeafShi1:Fix_14600_SmartTag_dialog_doesn't_disappear
Jun 10, 2026
Merged

LeafShi1 merged 1 commit into
dotnet:mainfrom
LeafShi1:Fix_14600_SmartTag_dialog_doesn't_disappear

Conversation

@LeafShi1

@LeafShi1 LeafShi1 commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

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

@SimonZhao888 SimonZhao888 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me!

@KlausLoeffelmann

Copy link
Copy Markdown
Member

Looks good to me, too.
Question: If the SmartTag Dialog has a ComboBox itself - does closing it affect the SmartTag Dialog now in any way, or is the behavior the same?

If it is, feel free to merge!

@LeafShi1

Copy link
Copy Markdown
Member Author

Looks good to me, too. Question: If the SmartTag Dialog has a ComboBox itself - does closing it affect the SmartTag Dialog now in any way, or is the behavior the same?

If it is, feel free to merge!

Closing the combo box has no effect.

Recording.2026-06-10.084803.mp4

@LeafShi1
LeafShi1 merged commit e0bbecd into dotnet:main Jun 10, 2026
10 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 15, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

3 participants