0

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))
        }
    }
}
2
  • Does the spinner remain visible for you when you release the pull? When I try it on an iPhone 17 simulator (iOS 18.5/26.0), the spinner is only visible while pulling, it is hidden again as soon as the pull is released and the buttons work normally after release. Or are you trying to tap a button at the same time as pulling? Commented Nov 11 at 16:09
  • 1
    @BenzyNeez sorry posted the wrong example now the spinner should stay visible for 60 seconds and during those 60s the buttons do not work correctly. Commented Nov 12 at 8:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.