Delay swapping out the web view until the new web view has had a chance to render. Issue #1780

This commit is contained in:
Maurice Parker 2020-02-08 16:55:16 -08:00
parent e5a9205747
commit bdd79aead5
1 changed files with 4 additions and 1 deletions

View File

@ -437,7 +437,10 @@ private extension WebViewController {
webView.configuration.userContentController.add(WrapperScriptMessageHandler(self), name: MessageName.imageWasShown)
self.renderPage()
self.recycleWebView(webViewToRecycle)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.recycleWebView(webViewToRecycle)
}
}