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.68k stars 2.22k forks source link

TextBoxes are completely unusable in WASM on Android device #11662

Open dbriard opened 1 year ago

dbriard commented 1 year ago

Describe the bug TextBox are unusable with super weird behavior when running in WASM on Android device.

To Reproduce Just play with TextBoxes and see what happens. You don't even had to touch the keyboard to see weird stuffs. I.e. some text is added automatically when we click in the TextBox to move the caret. We cannot delete TextBox content... it is just impossible to do something with TextBox which prevent the website to be cross platform. It is not new to RC I think as I can reproduce the behavior on play.avaloniaui.net

Expected behavior I hope you guys can make TextBox work on Wasm+android to make websites cross platform.

Screenshots 1) open page Screenshot_20230605-231944 2) click on TextBox Screenshot_20230605-231955 3) try to delete the text with backspace, it actually add more text Screenshot_20230605-232004

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

giuliohome commented 4 months ago

No solution after more than a year? I suspect that Avalonia can't be considered production ready for Android devices, the TextBox is a foundamental control and there is a similar issue also for an Android native project, see https://github.com/wieslawsoltes/ChatGPT/issues/76 and not only for the WASM in the browser.

dbriard commented 4 months ago

Can we have any new information about this issue? I really like Avalonia, but it's difficult to recommand it for a commercial web project when we know it will have those issues on Android Tablets and Phones. At least can we know if this issue can be fixed or not?

giuliohome commented 4 months ago

Is there an alternative way to interact with HTML input fields instead of dotnet TextBoxes for Avalonia wasm browser apps? () ... But I guess that would defeat the purpose of the binding... I'm afraid it is a blocker issue for the application of Avalonia to mobile browsers. The Android platform implementation is a little more usable, but still quite awkward. P.S. ( ) similar to this question https://github.com/AvaloniaUI/Avalonia/issues/7666#issuecomment-1046561288 and I see this PR has been merged https://github.com/AvaloniaUI/Avalonia/pull/8110 Maybe the "Blazor approach" (interop with html inputs) is the only way to resolve this problem?

maxkatz6 commented 4 months ago

Latest chromium browsers (including mobile) now support EditContext API which we can use for better IME handling.

Firefox and Safari can continue to use flawed approach with invisible input box.