Fix find and replace
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user