Resolves "New Tab" bug after web content process jettison

This commit is contained in:
2024-08-05 17:36:59 -07:00
parent 29057c8024
commit 69aa02e303
4 changed files with 32 additions and 9 deletions

View File

@@ -520,6 +520,8 @@ class BrowserViewController: UIViewController
}
internal func updateTitleAndURL(forWebView webView: WKWebView) {
guard let tab = tabController.tab(forWebView: webView) else { return }
if webView == browserView.webView {
browserView.titlebarView.setTitle(webView.title ?? "")
@@ -531,8 +533,7 @@ class BrowserViewController: UIViewController
}
// Figure out which tab this corresponds to
let tab = tabController.tabs.first { $0.webView == webView }
if let tab = tab, let tabIndex = tabController.tabs.firstIndex(of: tab) {
if let tabIndex = tabController.tabs.firstIndex(of: tab) {
tabBarViewController.tabBarView.reloadTab(atIndex: tabIndex)
}
}