Back button is not visible when navigating from a view with no toolbar to a view with a toolbar button on macOS 15.4 beta

On macOS 15.4 beta 2 (24E5222f), the back button is not visible when navigating from a view with no toolbar to a view with a toolbar button. The back button is visible on macOS 15.3.1 and earlier versions.

Also, the toolbar button shown when run on macOS 15.4 beta 2 is truncated.

This is how it looks on macOS 15.4 beta 2:

And this is how it looks on macOS 15.3.1 and earlier:

Feedback ID: FB16743834

Looking at the macOS 15.4 screenshot more closely, it looks like the back button is overlapping the navigation title.

This bug is still present in macOS 15.4 beta 3 24E5228e. Is there anyone from Apple that can help with this? It's affecting one of my apps on the App Store.

On macOS 15.4 beta 4, the toolbar button isn’t truncated anymore but the issue of the back button overlapping the title and being not clickable is still present.

The only way to get around this issue is to hide the back button using .navigationBarBackButtonHidden(true) and then make my own back button using the navigation toolbar placement.

Unfortunately, same issue happens today after updating to macOS 15.4 (24E248).

I also had no luck to fix the native BackButton.

So, replacing the native BackButton into a custom one with same design in all views was the simplest quick decision.

  1. Add MacOSBackButtonView into your project.
struct MacOSBackButtonView: View {
  @Environment(\.dismiss) private var dismiss

  var body: some View {
    VStack {}

    #if os(macOS)
    .navigationBarBackButtonHidden()
    .toolbar {
      ToolbarItem(placement: .navigation) {
        Button(action: { dismiss() }) {
          Image(systemName: "chevron.backward")
        }
      }
    }
    #endif
  }
}
  1. Add MacOSBackButtonView() into VStack (or any other place in body) of all views that must have BackButton on macOS.
struct YourView: View {
  var body: some View {
    VStack {
      MacOSBackButtonView()

      ...
    }
  }
}
  1. Now, You can forget about the issue.
Back button is not visible when navigating from a view with no toolbar to a view with a toolbar button on macOS 15.4 beta
 
 
Q