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
21.83k stars 1.67k forks source link

`Shell.Current.DisplayPromptAsync` doesn't react on `Enter` press on `WinUI` #17266

Open AndreasReitberger opened 10 months ago

AndreasReitberger commented 10 months ago

Description

When I display a prompt using

await Shell.Current.DisplayPromptAsync(...);

and run it on Windows, the prompt cannot be confirmed by pressing Enter.

Steps to Reproduce

  1. DIsplay a prompt using Shell.Current.DisplayPromptAsync and press enter on Windows

Link to public reproduction project repository

https://github.com/AndreasReitberger/MauiApp_Issue17266

Version with bug

7.0.92

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

Not yet

Relevant log output

No response

ghost commented 9 months ago

Hi @AndreasReitberger. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

AndreasReitberger commented 9 months ago

I created a repro here: https://github.com/AndreasReitberger/MauiApp_Issue17266

image

  1. Run it on "Windows"
  2. Click the "Open prompt" button
  3. Enter some text
  4. Press "Enter" on the Keyboard
  5. See that the dialog is not closed

image

XamlTest commented 7 months ago

Verified this on Visual Studio Enterprise 17.9.0 Preview 1(8.0.3). Repro on Windows 11, not repro on Android 14.0-API34, iOS 17.0 and MacCatalyst with below Project: MauiApp_Issue17266.zip

bengavin commented 4 months ago

Any guidance on how to enable this functionality prior to a new MAUI version?

AndreasReitberger commented 1 month ago

Any news on this? It would be great to accept the dialog with pressing Enter on WinUI and MacOS. Thanks!