diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusCardControl.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusCardControl.swift
index 402763be3..c3945f630 100644
--- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusCardControl.swift
+++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusCardControl.swift
@@ -241,8 +241,10 @@ extension StatusCardControl {
fileprivate func showWebView() {
let webView = setupWebView()
webView.loadHTMLString("" + html, baseURL: nil)
- addSubview(webView)
- webView.pinTo(to: imageView)
+ if webView.superview == nil {
+ addSubview(webView)
+ webView.pinTo(to: imageView)
+ }
}
}
@@ -259,6 +261,8 @@ extension StatusCardControl: WKNavigationDelegate, WKUIDelegate {
webView.uiDelegate = self
webView.navigationDelegate = self
webView.translatesAutoresizingMaskIntoConstraints = false
+ webView.isOpaque = false
+ webView.backgroundColor = .clear
self.webView = webView
return webView
}