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.97k stars 1.71k forks source link

Softkeyboard Return key of an Entry control shows Done when the property ReturnType is set to Next #23086

Open maictoa opened 2 months ago

maictoa commented 2 months ago

Description

Adding an entry control to a xaml file and setting the ReturnType property to Next will show the Done key in the softkeyboard instead of the Next key.

Steps to Reproduce

  1. Create a new .Net Maui App
  2. Select framework .NET 8.0
  3. Open the MainPage.xaml
  4. Add the control Entry ReturnType="Next"
  5. Add the control Entry ReturnType="Done"
  6. Verify that the Nuget packages for Microsoft.Maui.Controls and Microsoft.Maui.Control.Compatibility are still in version 8.0.40
  7. Run the project and observe that one entry shows Next and the other shows Done when the softkeyboard is displayed
  8. Update the Nuget packages for Microsoft.Maui.Controls and Microsoft.Maui.Control.Compatibility to version 8.0.60
  9. Run the project again and observe that Done shows on both entries for the keyboard return key image

Link to public reproduction project repository

No response

Version with bug

8.0.60 SR6

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.40 SR5

Affected platforms

Android

Affected platform versions

Android 10 and up

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 2 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

ninachen03 commented 2 months ago

Verified this original issue with Visual Studio 17.11.0 Preview 2.0 (8.0.60 & 8.0.3 ). Can repro it on android device(13.0-API33), but I can not repro it on android emulator (API34).

baaaaif commented 2 months ago

ReturnType="Search" doesn't work too

dineshmike commented 2 months ago

I am having the same issue in both MAUI 8.0.60 & 8.0.61. Downgrading to 8.0.40 fixes the issue.

Alternatively, you can use force update the input type using handler:

EntryHandler.Mapper.AppendToMapping("EntryReturnTypeFix", (handler, view) =>
{
#if ANDROID
        handler.PlatformView.UpdateReturnType(view);
#endif
});
FlavioGoncalves-Cayas commented 1 week ago

Same on MAUI 8.0.80. Honestly, I would expect regressions to be fixed faster than >2 months, but here we are.

@dineshmike thanks for the workaround.