AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
25.51k stars 2.21k forks source link

Keyboard focus issue after navigation between NativeControlHost and Avalonia TextBox #11751

Open Vladyslav-vm opened 1 year ago

Vladyslav-vm commented 1 year ago

Describe the bug The application is stopped with the exit code 0 if the focus is moved fromNativeControlHost to the Avalonia TextBox control and something is typed.

To Reproduce Steps to reproduce the behavior:

  1. Download the attached sample HostingLinuxControlDemoNew.zip

  2. Unzip, compile, and launch the application

  3. Click the "ClickMe!" button on the "dotnet" window Screenshot 2023-06-12 141707

  4. Put the focus on the Avalonia TextBox control and type something Screenshot 2023-06-12 141820

  5. The application is exited with code 0

Expected behavior Without issues, the focus should be moved between NativeControlHost and Avalonia TextBox and it should be possible to type in the "TextBox" control.

Desktop (please complete the following information):

Additional context The issue is not reproduced with versions 0.10.18-0.10.21

kekekeks commented 1 year ago

Keyboard focus integration isn't supported for X11 (we don't implement XEmbed yet)

Vladyslav-vm commented 1 year ago

Could you please describe how to organize focus transfer between NativeControlHost and an embedded window without XEmbed?

Which approaches do you support?