         return .lightContent
     }
 }
+
+extension AppDelegate {
+    fileprivate func navigateBrowserController(to url: URL) {
+        browserViewController.ensureBrowsingMode()
+        browserViewController.deactivateUrlBarOnHomeView()
+        browserViewController.dismissSettings()
+        browserViewController.dismissActionSheet()
+        browserViewController.submit(url: url)
+    }
+}

            if application.applicationState == .active {
                // If we are active then we can ask the BVC to open the new tab right away.
                // Otherwise, we remember the URL and we open it in applicationDidBecomeActive.
                browserViewController.submit(url: url)
            } else {
                queuedUrl = url
            }

                // If we are active then we can ask the BVC to open the new tab right away.
                // Otherwise, we remember the URL and we open it in applicationDidBecomeActive.
                if let fixedUrl = URIFixup.getURL(entry: text) {
                    navigateBrowserController(to: fixedUrl)
                } else {
                    browserViewController.openOverylay(text: text)
                }
