Remove old view before adding a new webview when doing a full reload. Fixes #3988.

This commit is contained in:
Maurice Parker
2023-10-10 20:39:08 -05:00
parent 269d0535bd
commit 4ab45f09bf

View File

@@ -557,6 +557,7 @@ private extension WebViewController {
// Add the webview - using autolayout will cause fullscreen video to fail and lose the web view
webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
self.webView?.removeFromSuperview()
self.view.insertSubview(webView, at: 0)
// UISplitViewController reports the wrong size to WKWebView which can cause horizontal