diff --git a/Sources/Brave/Frontend/Browser/BrowserViewController.swift b/Sources/Brave/Frontend/Browser/BrowserViewController.swift index e6c7cfe39f9..8fb67d4a459 100644 --- a/Sources/Brave/Frontend/Browser/BrowserViewController.swift +++ b/Sources/Brave/Frontend/Browser/BrowserViewController.swift @@ -104,7 +104,7 @@ public class BrowserViewController: UIViewController { var readerModeBar: ReaderModeBarView? var readerModeCache: ReaderModeCache - private let statusBarOverlay: UIView = { + let statusBarOverlay: UIView = { // Temporary work around for covering the non-clipped web view content let statusBarOverlay = UIView() statusBarOverlay.backgroundColor = Preferences.General.nightModeEnabled.value ? .nightModeBackground : .urlBarBackground @@ -784,8 +784,8 @@ public class BrowserViewController: UIViewController { view.addSubview(topTouchArea) view.addSubview(bottomBarKeyboardBackground) view.addSubview(footer) - view.addSubview(header) view.addSubview(statusBarOverlay) + view.addSubview(header) // For now we hide some elements so they are not visible header.isHidden = true diff --git a/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+ToolbarDelegate.swift b/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+ToolbarDelegate.swift index 0e8f2dddd28..6318d25ca8a 100644 --- a/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+ToolbarDelegate.swift +++ b/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+ToolbarDelegate.swift @@ -731,7 +731,11 @@ extension BrowserViewController: TopToolbarDelegate { if let ntpController = self.activeNewTabPageViewController, ntpController.parent != nil { view.insertSubview(favoritesController.view, aboveSubview: ntpController.view) } else { - view.insertSubview(favoritesController.view, aboveSubview: footer) + // Two different behaviors here: + // 1. For bottom bar we do not want to show the status bar color + // 2. For top bar we do so it matches the address bar background + let subview = isUsingBottomBar ? statusBarOverlay : footer + view.insertSubview(favoritesController.view, aboveSubview: subview) } favoritesController.didMove(toParent: self)