-
Notifications
You must be signed in to change notification settings - Fork 997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ToolStrip's ToolTip issues #12832
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStrip.cs:3289
- Ensure that there are tests covering the behavior of tooltips being removed when the control loses focus.
ToolTip.RemoveAll();
f15cc3e
to
f8aefcb
Compare
…layed after expanded and collapsed the toolStripDropDownbutton in toolStrip1, then tab to toolStrip2's item fix dotnet#12819 : Keyboard tooltip of toolStripDropDownbutton in toolStrip1 is displayed after expanded and collapsed the toolStripDropDownbutton in toolStrip2
f8aefcb
to
810320c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12832 +/- ##
===================================================
- Coverage 76.17317% 76.13736% -0.03581%
===================================================
Files 3240 3240
Lines 642343 642343
Branches 47270 47270
===================================================
- Hits 489293 489063 -230
- Misses 149509 149738 +229
- Partials 3541 3542 +1
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -3286,7 +3286,7 @@ protected override void OnLostFocus(EventArgs e) | |||
{ | |||
base.OnLostFocus(e); | |||
ClearAllSelections(); | |||
ToolTip.Hide(this); | |||
ToolTip.RemoveAll(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call ToolTip.RemoveAll(), all associated tooltips should be deleted. Please confirm whether the Tooltip will be displayed again when the control gets focus again
Please send it to the test team for further verification
Fixes #12818,#12819
Proposed changes
ToolStrip
loses focus, remove all tooltips.Regression?
Risk
Screenshots
Before
Issue1.mp4
Issue2.mp4
After
PR_12832.mp4
Test methodology
Test environment(s)
.Net 10.0.0-alpha.1.25072.13