iOS 26 Webview and alert issue

Hello,

In iOS 26 beta, we are seeing an unexpected behavior when using SwiftUI WebView (or a custom WKWebView via UIViewRepresentable).

When an alert is presented above the WebView, the WebView immediately reloads to its initial page. The alert itself also disappears instantly, making it impossible for the user to interact with it.

This issue occurs both with the new SwiftUI WebView / WebPage API and with a wrapped WKWebView. The problem was not present in previous iOS versions (iOS 17/18).

Steps to reproduce:

Create a SwiftUI view with a WebView (pointing to any URL).

Add a toolbar button that toggles a SwiftUI alert.

Run the app on iOS 26 beta.

Tap the button to trigger the alert.

Expected behavior: The WebView should remain as-is, and the alert should stay visible until the user dismisses it.

Actual behavior: As soon as the alert appears, the WebView reloads and resets to the initial page. The alert disappears immediately.

Minimal Example:

struct ContentView: View {
    @State private var showAlert = false

    var body: some View {
        NavigationStack {
            WebView(URL(string: "https://apple.com")!)
                .toolbar {
                    ToolbarItem(placement: .topBarTrailing) {
                        Button("Close") {
                            showAlert = true
                        }
                    }
                }
                .alert("Confirm close?", isPresented: $showAlert) {
                    Button("Cancel", role: .cancel) {}
                    Button("Close", role: .destructive) {}
                }
        }
    }
}

I'm using Xcode Version 26.0 beta 7

Thanks for your help.

Hello,

Update: This problem seems to happens when the WebView is presented inside a .sheet / .fullScreenCover. If the same WebView is presented via NavigationStack / navigationDestination, the issue does not occur — alerts work normally and the WebView does not reload.

Thanks

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

iOS 26 Webview and alert issue
 
 
Q