SwiftUI iOS 17 - Sheet presented by inspector loses default accentColor for interactivity

Feedback ID: FB13481459

Adding the presentationBackgroundInteraction(.disabled) to a sheet causes the sheet’s content (in the sample project, this is a button) to lose its default accentColor behaviour.

import SwiftUI

@main
struct InspectorExample: App {
    var body: some Scene {
        WindowGroup {
            InspectorExampleView()
        }
    }
}

struct InspectorExampleView: View {
    @State private var inspectorPresented = false
    
    var body: some View {
        Button("Click") {
            inspectorPresented = true
        }.background(.white)
        .inspector(isPresented: $inspectorPresented) {
            Button("Sample Inspector") {}
                .presentationBackgroundInteraction(.disabled) // adding this modifier causes the Button view to lose its default accent color
        }
    }
}

#Preview {
    InspectorExampleView()
}

The images show the button with the default blue accent colour (expected) vs. the grey out version (actual).

Same her event with icon buttons. They will display in accent colour on iPad but not iOS

SwiftUI iOS 17 - Sheet presented by inspector loses default accentColor for interactivity
 
 
Q