Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Epica3055
Copy link
Member

@Epica3055 Epica3055 commented Jan 23, 2025

Fixes #12818,#12819

Proposed changes

  • when ToolStrip loses focus, remove all tooltips.

Regression?

  • No

Risk

  • low

Screenshots

Before

Issue1.mp4
Issue2.mp4

After

PR_12832.mp4

Test methodology

  • Manually

Test environment(s)

.Net 10.0.0-alpha.1.25072.13

@Epica3055 Epica3055 requested a review from Copilot January 23, 2025 10:06

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();
…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
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.13736%. Comparing base (5fc66aa) to head (810320c).
Report is 2 commits behind head on main.

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     
Flag Coverage Δ
Debug 76.13736% <100.00000%> (-0.03581%) ⬇️
integration 18.11283% <100.00000%> (-0.08183%) ⬇️
production 50.08232% <100.00000%> (-0.08163%) ⬇️
test 96.97774% <ø> (+0.00083%) ⬆️
unit 47.49070% <100.00000%> (+0.00139%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@Epica3055 Epica3055 marked this pull request as ready for review January 24, 2025 06:11
@Epica3055 Epica3055 requested a review from a team as a code owner January 24, 2025 06:11
@Epica3055 Epica3055 removed the draft draft PR label Jan 24, 2025
@@ -3286,7 +3286,7 @@ protected override void OnLostFocus(EventArgs e)
{
base.OnLostFocus(e);
ClearAllSelections();
ToolTip.Hide(this);
ToolTip.RemoveAll();
Copy link
Member

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

@Tanya-Solyanik Tanya-Solyanik added waiting-author-feedback The team requires more information from the author waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-author-feedback The team requires more information from the author waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s)
Projects
None yet
3 participants