Suppose there are two buttons in VStack, the second button is unclickable. I'm running macOS 15.2 with Xcode 16.2.
import SwiftUI
struct ContentView: View {
var body: some View {
ScrollView(.horizontal) {
VStack {
Spacer()
// this button is clickable
Button("foo") {
print("foo")
}
// this button can't be clicked
Button("bar") {
print("bar")
}
}
}
}
}
- If I change
.horizontal
->.vertical
andVStack
->HStack
, the second button behave normally. - If I remove ScrollView, everything works fine.
- it works fine before macOS 15.2.