@DancesWithDingo not sure if you got a response on this, or a fix, but I've just stumbled on one with the help of Claude.ai.
Adding the following modifiers to your button worked for a very similar scenario:
.background(Color.clear)
.contentShape(Rectangle())
I also found adding this helped as well:
.highPriorityGesture(TapGesture().onEnded {
Task { @MainActor in
your button action here
}
})
.allowsHitTesting(true)
Finally, adding this last one to your Map:
.simultaneousGesture(TapGesture().onEnded { _ in })
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: