microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

WinUI Ignores Hide Pointer While Typing Option

Open aquinn39 opened this issue 6 months ago • 1 comments

Describe the bug

Windows has an option in Settings -> Bluetooth & devices -> Mouse -> Additional mouse settings -> Pointer Options called 'Hide pointer while typing' which is on by default and automatically hides the mouse cursor while you're typing. This is quite useful as sometimes you might click into a text field and start typing and some of the text gets covered by the mouse cursor, so you might need to move the cursor so you can see what you're typing. It isn't a big deal to have to do that, but it can get annoying having to do it a lot. Currently, WPF, Windows Forms, and the Windows common controls already support this feature by default.

Steps to reproduce the bug

  1. Create a WinUI 2 or 3 application
  2. Add a TextBox to the UI
  3. Positon the mouse cursor so that it is over the window with the TextBox
  4. Run the app and type into the TextBox
  5. The cursor does not dissapear, even if it is covering the TextBox

Expected behavior

The cursor should dissapear if it is over the window when typing into the TextBox, as it does when typing into a WPF, Windows Forms or Windows Common Controls TextBox.

Screenshots

This is the option which I am referring to: image

NuGet package version

WinUI 3 - Windows App SDK 1.4.4: 1.4.231219000

Windows version

Windows 11 (22H2): Build 22621

Additional context

Happens in both WinUI 2 and 3. Also happens on Windows 10 22H2 (Build 19045) and probably all other versions of Windows 11 and 10, but haven't tested other versions.

aquinn39 avatar Feb 06 '24 07:02 aquinn39

Don't really remember this feature. It seems old tech would do this properly, but many of todays' new app does not, like chrome/Edge/all the electron-based app. But interestingly, the new terminal does it while old conhost does not. Would like to know how this is implemented.

HO-COOH avatar Feb 07 '24 09:02 HO-COOH