diff --git a/ios-app/Luker/ViewController.swift b/ios-app/Luker/ViewController.swift index c9c19c0a2..f66c568b1 100644 --- a/ios-app/Luker/ViewController.swift +++ b/ios-app/Luker/ViewController.swift @@ -240,11 +240,15 @@ final class ViewController: UIViewController { webView.uiDelegate = self webView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(webView) + // Keep the web layer inside the safe area: the page uses viewport-fit=cover + // but never applies env(safe-area-inset-*), so a full-bleed web view puts the + // top bar under the Dynamic Island and the input under the home indicator. + view.backgroundColor = .systemBackground NSLayoutConstraint.activate([ - webView.leadingAnchor.constraint(equalTo: view.leadingAnchor), - webView.trailingAnchor.constraint(equalTo: view.trailingAnchor), - webView.topAnchor.constraint(equalTo: view.topAnchor), - webView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + webView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor), + webView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), + webView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), + webView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), ]) self.webView = webView webView.load(URLRequest(url: runtime.serverURL))