dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.41k stars 981 forks source link

[Windows11] keyboard toolTip and mouse toolTip are always displayed continuously #12374

Open Olina-Zhang opened 1 week ago

Olina-Zhang commented 1 week ago

.NET version

.NET SDK 10.0.100-alpha.1.24510.13

Did it work in .NET Framework?

No

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No

Issue description

On Windows 11, controls' keyboard toolTip and mouse toolTip are always displayed continuously. This issue doesn't repro on Win10.

https://github.com/user-attachments/assets/d726f418-3538-4d23-9f14-bbb9b4d32a23

Steps to reproduce

  1. Create a Winforms .NET application
  2. Add 2 buttons and 2 tooltip
  3. Set tooltip for these 2 buttons
  4. Build and run
  5. Tab button to display tooltip or use mouse to display tooltip, wait for tooltip to disappear

Use test app: WinFormsApp3.zip

Tanya-Solyanik commented 1 week ago

@Olina-Zhang, @LeafShi1 - could you please investigate if the same issue is present in native Win32 applications, either notepad, or create a custom MFC app with tooltips.

LeafShi1 commented 1 week ago

@Olina-Zhang, @LeafShi1 - could you please investigate if the same issue is present in native Win32 applications, either notepad, or create a custom MFC app with tooltips.

This should be a Windows issue, the same issue exists in notepad, File Explorer, MFC Application Image

merriemcgaw commented 1 week ago

@Olina-Zhang can you file an issue in the OS AzDO? We'll track it but I doubt there's much we're able to do.

Olina-Zhang commented 1 week ago

@Olina-Zhang can you file an issue in the OS AzDO? We'll track it but I doubt there's much we're able to do.

Filed OS AzDO issue: 54688683. please help see if area path is correct.

Olina-Zhang commented 4 days ago

@Tanya-Solyanik @merriemcgaw that OS AzDo bug: 54688683 was resolved "By design". Windows team told Tooltip behavior was intentionally changed years ago for accessibility reasons. If this appears to not be in compliance with WCAG 2.1 Tooltips behavior, let them know. If that's the case, for the Winforms tooltip control, it conflicts with the setting of tooltip's AutoPopDelay property obviously on Win11.

Tanya-Solyanik commented 3 days ago

Hi @Olina-Zhang I misunderstood your bug report, yes this is "by design". The default AutoPopDelay had been overwritten on Win11 - the tooltip is dismissed by user action only. If the user changes AutoPopDelay to a non-default value, then that new delay will be applied to the tooltip - try setting it to 1000 for example

I'll reuse this issue as a reminder to update the docs

Olina-Zhang commented 1 day ago

If the user changes AutoPopDelay to a non-default value, then that new delay will be applied to the tooltip - try setting it to 1000 for example

It does, and we need to reset the AutoPopDelay to a non-default value on Win11.