dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.26k stars 1.76k forks source link

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

Closed RsZoli closed 1 week ago

RsZoli commented 1 week ago

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

mattleibow commented 1 week ago

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

Zhanglirong-Winnie commented 1 week ago

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.

jfversluis commented 1 week ago

This issue was moved to CommunityToolkit/Maui#2340