diff --git a/firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift b/firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift index 9a06f5fe0e54..beb4e21ba793 100644 --- a/firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift +++ b/firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift @@ -492,7 +492,8 @@ class BrowserViewController: UIViewController, // If we are displaying a private tab, hide any elements in the tab that we wouldn't want shown // when the app is in the home switcher guard let privateTab = tabManager.selectedTab, - privateTab.isPrivate + privateTab.isPrivate, + canShowPrivacyView else { return } view.bringSubviewToFront(webViewContainerBackdrop) @@ -508,6 +509,12 @@ class BrowserViewController: UIViewController, presentedViewController?.view.alpha = 0 } + var canShowPrivacyView: Bool { + // Show privacy view if no view controller is presented + // or if the presented view is a PhotonActionSheet. + self.presentedViewController == nil || presentedViewController is PhotonActionSheet + } + @objc func appDidBecomeActiveNotification() { // Re-show any components that might have been hidden because they were being displayed @@ -518,13 +525,11 @@ class BrowserViewController: UIViewController, options: UIView.AnimationOptions(), animations: { self.contentStackView.alpha = 1 - if self.isToolbarRefactorEnabled { self.addressToolbarContainer.alpha = 1 } else { self.urlBar.locationContainer.alpha = 1 } - self.presentedViewController?.popoverPresentationController?.containerView?.alpha = 1 self.presentedViewController?.view.alpha = 1 }, completion: { _ in