I'm using material background in SwiftUI (introduced with iOS 15). When applied to a view that also has a contextMenu modifier when the context menu is shown it darkens the whole content. To make sure it's not related to my project I created an example project and it has the same issue.
Code:
struct ContentView: View {
var body: some View {
ZStack {
Color(.systemBlue).ignoresSafeArea()
Text("Press for Context Menu")
.padding()
.background(.regularMaterial)
.contextMenu {
Button("Option 1", action: {})
Button("Option 2", action: {})
Button("Option 3", action: {})
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
// .preferredColorScheme(.dark)
}
}


