Cannot type `Key.Space` into a `TextBox` inside a `SelectingItemsControl`
See original GitHub issueDescribe the bug
SelectingItemsControl.OnKeyDown
handles certain KeyEventArgs
events.
The event being marked as handled causes Avalonia.Win32.WindowImpl.AppWndProc
to set its _ignoreWmChar
field and not to raise an event when the WM_CHAR message is subsequently received, which finally causes Avalonia.Input.KeyboardDevice.ProcessRawEvent
not to create a TextInputEventArgs
event.
The space key is thus never seen by TextBox
, even though it has keyboard focus when the key is pressed.
To Reproduce Create a window with this XAML:
<ListBox>
<TextBox/>
</ListBox>
Try typing into the text box. You will not be able to type a space character.
Expected behavior Normal text input.
Desktop (please complete the following information):
- OS: Windows 10
- Version 11preview4
Issue Analytics
- State:
- Created 10 months ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
c# - TextBox ignores "Space" key input. Why?
When I put a breakpoint inside the "KeyDown" event handler and press "Space", the args.Key is "Unknown" ( args.PlatformKeyCode is "160"). I have ......
Read more >Cannot type spaces into input within dropdown menu #8011
When placing an input within the top-bar element you can no longer type spaces into it. For example: "hello world" is not possible, ......
Read more >Can't use the space key in text input fields [Archive]
(EDIT: When a different key is assigned to transport play, say Enter, then using Space in plugins works just fine! But curiously -...
Read more >Cannot press spacebar in the textarea HTML element
The textarea never allows a space entry. I tried this solution and added game.input.keyboard.clearCaptures() but nothing happened. When I try to ...
Read more >Logitech Combo Keyboard Space Key Issue
This problem appears when I'm typing in a text field, like this one. (I have had to hold the shift key and press...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@workgroupengineering you are good to go. The PR will be accepted 👍
Thanks for looking into it.
🙏 Please add a unit test for this as we really need to make sure this will not happen again.
Hi, I have a similar problem with the following xaml:
Regression is introduced with pr #11455 when keyboard interaction is moved from
SelectingItemsControl
toListBox
the fix for pr #9629 has been lost.Can I redo the fix of pr #9629 on the
ListBox
?