Delay making the initial web view available to give it some time to load the DOM. Issue #1756

This commit is contained in:
Maurice Parker 2020-02-01 16:41:10 -08:00
parent fcd7b88a62
commit 596575c0e8
1 changed files with 4 additions and 2 deletions

View File

@ -55,8 +55,10 @@ class WebViewProvider: NSObject, WKNavigationDelegate {
if waitingForFirstLoad {
waitingForFirstLoad = false
if let completion = waitingCompletionHandler {
completeRequest(completion: completion)
waitingCompletionHandler = nil
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.completeRequest(completion: completion)
self.waitingCompletionHandler = nil
}
}
}
}