diff --git a/App/Browser View/BrowserViewController.swift b/App/Browser View/BrowserViewController.swift index ee65977..b800e38 100644 --- a/App/Browser View/BrowserViewController.swift +++ b/App/Browser View/BrowserViewController.swift @@ -265,13 +265,15 @@ class BrowserViewController: UIViewController // Find on page documentControls.findOnPageControlView.addAction(UIAction(handler: { [unowned self] _ in - documentControls.dismiss(animated: true, completion: nil) - - if FindOnPageViewController.isEnabled() { - browserView.setFindOnPageVisible(true, animated: true) - } else if #available(iOS 16.0, *) { - browserView.webView?.findInteraction?.presentFindNavigator(showingReplace: false) - } + documentControls.dismiss(animated: true, completion: { [unowned self] in + // Needs to happen after dismissal, otherwise the find navigator will pick up the document + // controls as the divergent responder/deepest action responder (my bad...). + if FindOnPageViewController.isEnabled() { + browserView.setFindOnPageVisible(true, animated: true) + } else if #available(iOS 16.0, *) { + browserView.webView?.findInteraction?.presentFindNavigator(showingReplace: false) + } + }) }), for: .touchUpInside) // Navigation controls