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.01k stars 1.73k forks source link

[iOS] Double dash converts into a single long dash on after 20584 fix #21561

Open MichaelShapiro opened 5 months ago

MichaelShapiro commented 5 months ago

Description

I originally submitted a bug where a double dash in an Entry caused a crash on iOS #20439. It as fixed by #20584 in MAUI 8.0.10.

I believe there is still a bug in that fix unfortunately. The reproduction steps are identical as in the original report.

There is a page (PageN) that hosts an Entry with a Text property set in xaml to double dash.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="DoubleDashCrash.DoubleDashCrashPage"
             Title="Double Dash Crash Page">

    <Editor
        Text="--"
        BackgroundColor="Yellow"
        VerticalOptions="Center" 
        HorizontalOptions="Center" />

</ContentPage>

If you do not tap inside the Entry in step 1 above before visiting PageN then the Entry does correctly reflect double dash (two dashes).

https://github.com/dotnet/maui/assets/36049508/1578b1a6-6170-4356-a4cf-f0c25e37d746

Steps to Reproduce

Before visiting the above page you land on another page (PageA) that also hosts an Entry.

  1. Land on PageA. Tap inside the entry. Just tap, no need to type anything
  2. Now visit PageN.

Expected result: the Entry reflects the text that was set in xamls above, which is double dash Actual (bug): The entry reflects a single long dash.

Link to public reproduction project repository

https://github.com/MichaelShapiro/MauiBugs/tree/master/DoubleDashCrash

Version with bug

8.0.10 SR3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

no

Relevant log output

No response

RoiChen001 commented 5 months ago

Can repro this issue at iOS platform on the latest 17.10.0 Preview 2(8.0.14).