CommunityToolkit / Maui

The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, and Behaviors to help make your life as a .NET MAUI developer easier
https://learn.microsoft.com/dotnet/communitytoolkit/maui
MIT License
2.27k stars 401 forks source link

Entry is autofocused in a Popup but the soft keyboard is not opened, also cannot be opened from code! #2340

Open jfversluis opened 1 day ago

jfversluis commented 1 day ago

Issue moved from dotnet/maui#25793


From @RsZoli on Tuesday, November 12, 2024 11:43:33 AM

Description

Focusing an Entry on a ContentPage opens the soft keyboard, and the same Entry can be focused with the keyboard opening from code as well, using:

await Entry_Name_In_Xaml.ShowKeyboardAsync(CancellationToken.None);

However if i put the very same Entry in a (CommunityToolkit.Maui.Views.)Popup, the Entry is focused automatically, which would not be an issue, if the soft keyboard would open as well, but it doesn't, nor can it be opened from code using:

await Entry_Popup.ShowKeyboardAsync(CancellationToken.None);

Image

Image

Steps to Reproduce

  1. Clone/download my repository
  2. Check the behavior under "EntryFocusBugRepro"

Link to public reproduction project repository

https://github.com/RsZoli/GitHubRepros

Version with bug

8.0.93 SR9.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 14

Did you find any workaround?

Sadly, no!

Relevant log output

jfversluis commented 1 day ago

Issue moved from dotnet/maui#25793


From @mattleibow on Tuesday, November 12, 2024 9:58:47 PM

This may be a bug in the maui community toolkit, maybe open the issue there for them to investigate?

jfversluis commented 1 day ago

Issue moved from dotnet/maui#25793


From @Zhanglirong-Winnie on Wednesday, November 13, 2024 2:06:12 AM

This issue has been verified using Visual Studio 17.12 Preview 5(8.0.93 & 8.0.92 & 8.0.3 & 9.0.0-rc.2.24503.2). Can repro this issue on android platform.