-
Notifications
You must be signed in to change notification settings - Fork 701
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
NumberBox will sometimes not respond to input from the keyboard #10286
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you! Closed similar issues:
|
Suggested issue (#5614) is not a duplicate or particularly relevant. |
Example behaviour with Keyviz used to show key presses |
Can you write out what specific keyboard inputs you are doing to repro this issue? I am unable to simply using tab and shift + tab to focus and unfocus. If you can provide a time travel trace for the repro that will be even better. |
Is it duplicate to this #10223 ? |
Not duplicate to #10223 - that issue describes the rest of the UI freezing after changing the NumberBox with the arrow keys, this one is about the NumberBox not accepting most keyboard input. @karkarl - I've created a minimal reproducible example at https://github.com/jb-bcl/microsoft-ui-xaml-10286. I've been using the mouse to focus the NumberBox, finding most success when clicking between the visible value and the space where the "X" button will appear; then, pressing any number key (number row, number pad, etc), backspace, or any other key other than the left arrow. It doesn't happen every time, so it might take a good few tries to get the repro to happen. I've tried to create a time travel trace, but I've been unable to reproduce it while ttd.exe is attached to the process (trying on this repro, the winUI3 gallery, and even the codebase where I first encountered this issue, though that one I would be unable to share). TTD seems to make all WinUI apps quite slow, perhaps that's related. |
Describe the bug
Sometimes, the NumberBox control (
Microsoft.UI.Xaml.Controls.NumberBox
) will not properly take input from the keyboard. This happens after focusing the control, especially the first time the control is focused after it is given a value. When this bug occurs, the only way to get the control to accept input is either to un-focus and re-focus the control, or to use the arrow keys to move the cursor.Steps to reproduce the bug
I've found that this works best for applications that have been launched recently. It is more difficult (but not impossible) to reproduce a second or third time, even if the NumberBox is a different instance.
NB: This bug does not occur every time, but it is by no means rare.
Expected behavior
The highlighted value in the NumberBox should be overwritten by the number that was inputted to the box.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003
Windows version
Windows 11 (23H2): Build 22631
Additional context
Bug has been present since at least WinAppSDK 1.6.240923002 (also tested in the latest, 1.6.241114003). I have been unable to reproduce it with WinUI 2.
Other factors considered:
The text was updated successfully, but these errors were encountered: