Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #8393: Update the progress & url correctly when cancelling a load #8432

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/Brave/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,10 @@ public class BrowserViewController: UIViewController {
case .loading:
if tab === tabManager.selectedTab {
topToolbar.locationView.loading = tab.loading
// There is a bug in WebKit where if you cancel a load on a request the progress can stick to 0.1
if !tab.loading, webView.estimatedProgress != 1 {
topToolbar.updateProgressBar(1)
}
}
case .URL:
guard let tab = tabManager[webView] else { break }
Expand All @@ -1720,6 +1724,8 @@ public class BrowserViewController: UIViewController {
// Catch history pushState navigation, but ONLY for same origin navigation,
// for reasons above about URL spoofing risk.
navigateInTab(tab: tab)
} else {
updateURLBar()
}

// Rewards reporting
Expand Down
Loading