Skip to content

Commit

Permalink
Fix brave/brave-ios#8576: Address bar blank before website starts loa…
Browse files Browse the repository at this point in the history
  • Loading branch information
soner-yuksel authored Dec 18, 2023
1 parent 7601a75 commit 94870c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/Brave/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1755,6 +1755,14 @@ public class BrowserViewController: UIViewController {
navigateInTab(tab: tab)
} else {
updateURLBar()
// If navigation will start from NTP, tab display url will be nil until
// didCommit is called and it will cause url bar be empty in that period
// To fix this when tab display url is empty, webview url is used
if tab.url?.displayURL == nil {
if let url = webView.url, !url.isLocal, !InternalURL.isValid(url: url) {
updateToolbarCurrentURL(url.displayURL)
}
}
}

// Rewards reporting
Expand Down

0 comments on commit 94870c2

Please sign in to comment.