Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS BackButton Title cannot be set to string.Empty or "" #25742

Open
FreakyAli opened this issue Nov 8, 2024 · 2 comments · May be fixed by #25813
Open

iOS BackButton Title cannot be set to string.Empty or "" #25742

FreakyAli opened this issue Nov 8, 2024 · 2 comments · May be fixed by #25813
Assignees
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/iOS 🍎 t/bug Something isn't working
Milestone

Comments

@FreakyAli
Copy link

FreakyAli commented Nov 8, 2024

Description

Using Shell if you remove the back button title or set it to empty it does not work and just sets it to the previous page title.
This worked fine on Xamarin.Forms

Steps to Reproduce

  • Create two pages using Shell as the Navigation
  • Once you have navigate from Page 1 to Page 2
  • On Page 2 use the below Behavior
<Shell.BackButtonBehavior>
     <BackButtonBehavior TextOverride="" />   
</Shell.BackButtonBehavior>

Expected Behavior:

Back button text should show empty

Actual behavior:

It will show a back button with the previous page title

Link to public reproduction project repository

No response

Version with bug

8.0.90 SR9

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

8.0.92 SR9.2

Affected platforms

iOS

Affected platform versions

All iOS devices I can find

Did you find any workaround?

No

Relevant log output

NA

@FreakyAli FreakyAli added the t/bug Something isn't working label Nov 8, 2024
@kubaflo kubaflo added platform/iOS 🍎 area-controls-shell Shell Navigation, Routes, Tabs, Flyout labels Nov 10, 2024
@sheiksyedm sheiksyedm self-assigned this Nov 11, 2024
@mattleibow
Copy link
Member

@PureWeen I somehow feel this is an iOS "design" decision? The OS will use the previous title if you clear it.

@FreakyAli what happens if you use a blank string " "? Does iOS do any trimming?

Everyone thought the ages was using a space... https://stackoverflow.com/questions/23853617/uinavigationbar-hide-back-button-text

You could use a {OnPlatform iOS=' ', Default=''} and then that will hopefully clear it. But yeah, iOS is "smart" and does what it wants.

@mattleibow mattleibow added the s/needs-info Issue needs more info from the author label Nov 11, 2024
@FreakyAli
Copy link
Author

@PureWeen I somehow feel this is an iOS "design" decision? The OS will use the previous title if you clear it.

@FreakyAli what happens if you use a blank string " "? Does iOS do any trimming?

Everyone thought the ages was using a space... https://stackoverflow.com/questions/23853617/uinavigationbar-hide-back-button-text

You could use a {OnPlatform iOS=' ', Default=''} and then that will hopefully clear it. But yeah, iOS is "smart" and does what it wants.

The same thing happens when you give it a whitespace

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Nov 11, 2024
@PureWeen PureWeen added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Nov 11, 2024
@mattleibow mattleibow added this to the Backlog milestone Nov 12, 2024
@mattleibow mattleibow removed the s/needs-attention Issue has more information and needs another look label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
5 participants