-
Notifications
You must be signed in to change notification settings - Fork 804
Open
Labels
bugSomething isn't workingSomething isn't workingteam-ControlsIssue for the Controls teamIssue for the Controls team
Description
Describe the bug
The KeyDown event is not triggered for the Down Arrow key when the cursor is at position 0 in the TextBox. Only the KeyUp event is fired correctly when pressing the Down Arrow key.
This issue occurs only when the TextBox contains text. If the TextBox is empty, the KeyDown event is triggered as expected.
<TextBox Height="50"
Width="200"
Text="Hello, World!"
KeyDown="TextBox_KeyDown"
KeyUp="TextBox_KeyUp">
</TextBox> private void TextBox_KeyDown(object sender, KeyRoutedEventArgs e)
{
Debug.WriteLine("The TextBox Key Down fired : " + e.Key.ToString());
}
private void TextBox_KeyUp(object sender, KeyRoutedEventArgs e)
{
Debug.WriteLine("The TextBox Key Up fired : " + e.Key.ToString());
}Steps to reproduce the bug
- Run the attached sample.
- Tap the TextBox (ensure the cursor is at the 0th position).
- Press the Down Arrow key on the keyboard.
- Observe the Output window, the KeyDown event is not triggered, only the KeyUp event is triggered
Expected behavior
The KeyDown event should be triggered properly when pressing the Down Arrow key.
Screenshots
TextBox.mp4
NuGet package version
WinUI 3 - Windows App SDK 1.7.1: 1.7.250401001
Windows version
Windows 11 (23H2): Build 22631
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingteam-ControlsIssue for the Controls teamIssue for the Controls team