@@ -850,7 +850,13 @@ public protocol ThemePresenter: AnyObject {
850850 presentUrlForTheme ( theme, url: theme? . viewUrl ( ) , onClose: onWebkitViewControllerClose)
851851 }
852852
853- @objc open func presentUrlForTheme( _ theme: Theme ? , url: String ? , activeButton: Bool = true , modalStyle: UIModalPresentationStyle = . pageSheet, onClose: ( ( ) -> Void ) ? = nil ) {
853+ @objc open func presentUrlForTheme(
854+ _ theme: Theme ? ,
855+ url: String ? ,
856+ activeButton: Bool = true ,
857+ modalStyle: UIModalPresentationStyle = . pageSheet,
858+ onClose: ( ( ) -> Void ) ? = nil
859+ ) {
854860 guard let theme, let url = url. flatMap ( URL . init ( string: ) ) else {
855861 return
856862 }
@@ -870,8 +876,14 @@ public protocol ThemePresenter: AnyObject {
870876
871877 let webViewController = WebViewControllerFactory . controller ( configuration: configuration, source: " theme_browser " )
872878 webViewController. navigationItem. rightBarButtonItem = activateButton
879+
873880 let navigation = UINavigationController ( rootViewController: webViewController)
874881 navigation. modalPresentationStyle = modalStyle
882+ if #available( iOS 18 , * ) , let indexPath = collectionView. indexPathsForSelectedItems? . first {
883+ navigation. preferredTransition = . zoom( sourceViewProvider: { [ weak self] _ in
884+ self ? . collectionView. cellForItem ( at: indexPath) ? . contentView
885+ } )
886+ }
875887
876888 if searchController != nil && searchController. isActive {
877889 searchController. dismiss ( animated: true , completion: {
0 commit comments