2

Overview

On macOS, in a NavigationSplitView when the menu button is added to the detail view toolbar, it seems to look disabled (refer to steps to reproduce)

Question:

  • Is there a way to not look disabled (2nd time the sidebar cell is tapped)?

Environment

  • Xcode: 14.1 beta 3 (14B5033e)
  • macOS: 13.0 Beta (22A5365d)

Code:

struct ContentView: View {
    
    @State private var selectedNumber: Int?
    
    var body: some View {
        
        NavigationSplitView {
            List(0..<100, selection: $selectedNumber) { number in
                Text("cell \(number)")
            }
        } detail: {
            Text("Detail")
                .toolbar {
                    ToolbarItem {
                        Menu {
                            Button("aa") {}
                            Button("bb") {}
                        } label: {
                            Label("Add Bookmark", systemImage: "book")
                        }
                    }
                }
        }
    }
}

Steps to reproduce:

  1. Run the project on macOS
  2. Select cell 0 on the sidebar
  3. Click on the book toolbar button and notice the menu appear
  4. Select cell 1 on the sidebar

Expected Behaviour

After step 4, the book toolbar button should look prominent (like it is enabled)

Actual Behaviour

After step 4, the book toolbar button looks like it is disabled.

Screenshot

Toolbar button looks disabled though it is not

Feedback

  • I have filed a feedback, hope it gets fixed.
  • It might help if more feedbacks are filed as it might help get noticed
user1046037
  • 16,755
  • 12
  • 92
  • 138
  • 2
    Same, I also filed as FB10950757. – Hunter Dec 04 '22 at 17:43
  • Some problem. And do you also see the following behaviour: sometimes, the menu button does show as enabled, but in that case it still doesn't show a hover effect like regular buttons do. It's curious because in Apple's apps, e.g. Finder, this works (hover on menus, not only buttons) but I guess they don't use SwiftUI. – Erik Doernenburg Jul 15 '23 at 21:14

0 Answers0