I have a ScrollView with several Buttons and a .refreshable modifier. As soon as I pull to refresh and the refresh indicator appears, the tap targets no longer match the visible button positions. For example, tapping button A triggers button B’s action, as if the hit-testing region didn’t move along with the content.
This only happens while the refresh indicator is shown. Before pulling to refresh, everything is correct and afterwards as well. Tested on iOS 18 and 26 (Xcode 16.4, Xcode 26).
Here is a minimal reproducible example:
import SwiftUI
struct ContentView: View {
var body: some View {
ScrollView {
VStack {
Button("Button A") {
print("A")
}
.buttonStyle(.borderedProminent)
Button("Button B") {
print("B")
}
.buttonStyle(.borderedProminent)
Button("Button C") {
print("C")
}
.buttonStyle(.borderedProminent)
Button("Button D") {
print("D")
}
.buttonStyle(.borderedProminent)
Button("Button E") {
print("E")
}
.buttonStyle(.borderedProminent)
}
.frame(maxWidth: .infinity)
}
.refreshable {
try? await Task.sleep(for: .seconds(60))
}
}
}