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

iOS Action sheet appearing on Editor focus #25945

Closed inimirpaz closed 2 days ago

inimirpaz commented 2 days ago

Description

When an Editor gets focus on iOS, an empty action sheet appears.

Image

Steps to Reproduce

No response

Link to public reproduction project repository

https://github.com/inimirpaz/maui_issues/tree/editor_issue

Version with bug

8.0.93 SR9.3

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

formerlymisterhenson commented 2 days ago

Maybe this workaround helps - IMO annoying feature

    public static MauiApp CreateMauiApp()
    {
#if IOS
        // :Information: Workaround
        // with MAUI it seems that by default there are some additional navigation elements
        // for example a "Done" button for text input. This is a workaround to rid of them.
        // Source: https://github.com/dotnet/maui/issues/17768
        Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("EditorChange", (handler, view) =>
        {
            handler.PlatformView.InputAccessoryView = null;
        });
...
#endif
jfversluis commented 2 days ago

Duplicate of #17768

inimirpaz commented 2 days ago

Maybe this workaround helps - IMO annoying feature

    public static MauiApp CreateMauiApp()
    {
#if IOS
        // :Information: Workaround
        // with MAUI it seems that by default there are some additional navigation elements
        // for example a "Done" button for text input. This is a workaround to rid of them.
        // Source: https://github.com/dotnet/maui/issues/17768
      Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("EditorChange", (handler, view) =>
      {
          handler.PlatformView.InputAccessoryView = null;
      });
...
#endif

That's great. Thank you!