diff --git a/iOS/Article/ArticleViewController.swift b/iOS/Article/ArticleViewController.swift index 2cc406761..ddd32ad4a 100644 --- a/iOS/Article/ArticleViewController.swift +++ b/iOS/Article/ArticleViewController.swift @@ -233,7 +233,6 @@ class ArticleViewController: UIViewController { if AppDefaults.articleFullscreenEnabled { currentWebViewController?.hideBars() } - resetWebViewController() } // MARK: Actions diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index 71f8b259c..530443e2a 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -301,8 +301,10 @@ extension WebViewController: UIContextMenuInteractionDelegate { extension WebViewController: WKNavigationDelegate { func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { - while view.subviews.count > 1 { - view.subviews.last?.removeFromSuperview() + for (index, view) in view.subviews.enumerated() { + if index != 0, let oldWebView = view as? PreloadedWebView { + oldWebView.removeFromSuperview() + } } }