Don't show error if url bar is first responder

This commit is contained in:
James Magahern
2020-07-31 18:33:04 -07:00
parent 29c416374f
commit 084fe0f286
2 changed files with 5 additions and 3 deletions

View File

@@ -144,6 +144,7 @@ class BrowserViewController: UIViewController, WKNavigationDelegate,
// Error button
toolbarController.urlBar.errorButton.addAction(UIAction(handler: { [unowned self] _ in
let alert = UIAlertController(title: "Error", message: self.loadError?.localizedDescription, preferredStyle: .actionSheet)
alert.popoverPresentationController?.sourceView = self.toolbarController.urlBar.errorButton
alert.addAction(UIAlertAction(title: "Reload", style: .destructive, handler: { _ in
self.webView.reload()