Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Brave Doesn't Auto-Switch to Tab #698

Closed
jonathansampson opened this issue Jan 10, 2019 · 5 comments
Closed

Brave Doesn't Auto-Switch to Tab #698

jonathansampson opened this issue Jan 10, 2019 · 5 comments

Comments

@jonathansampson
Copy link
Contributor

Description:

Feedback from Discord:

I'm calling out to the installed Brave browser on my iPhone from some swift code in MY application and passing a URL in the call and have noticed that if the Brave browser is already loaded, the correct action takes place--the iPhone switches over to the running Brave browser, creates a new tab and drops my URL into the address bar and all is well. If the Brave browser is NOT running however, the call out to Brave launches the Brave browser, creates a new tab with the passed URL, but DOES NOT SWITCH over to the new tab! It stays on whatever was the last tab in focus prior to the Brave app being closed. The end result is that the user doesn't see the URL expected but instead sees the last URL the Brave browser had rendered. Is there some extra parameter I need to pass to the call to the Brave browser to make the action I want, consistent? (Emphasis added by Sampson)

Steps to Reproduce

let browser = "brave"
let bundleID = "(browser)://"
if USE_BRAVE && UIApplication.shared.canOpenURL(URL(string: bundleID)!) {
    print("App is install and can be opened")
    let link = link0?.replacingOccurrences(of: "https", with: "http")
                     .replacingOccurrences(of: "http", with: "(browser)://open-url?url=http")
    print("retailerUrl (link as Optional)")
    let url = URL(string:link!)
    if #available(iOS 10.0, *) {
        UIApplication.shared.open(url!, options: [:], completionHandler: nil)
    } else {
        UIApplication.shared.openURL(url!)
    }
}
@jonathansampson
Copy link
Contributor Author

I believe this user is experiencing the same issue: https://twitter.com/yroc92/status/1090849894892335104

image

@LaurenWags
Copy link
Member

@danishjafri88 could you clarify the test plan for this issue?

@danishjafri88
Copy link
Contributor

@LaurenWags

-Go to any other app where you have an option to tap a link. For example, notes, slack or even safari
-Long press a link
-On the action sheet select share
-Select Brave next

This should open a new tab with the link and should be in focus. Earlier it was opening the tab but was in focus.

@LaurenWags
Copy link
Member

blocked on #1263

@LaurenWags
Copy link
Member

LaurenWags commented Jul 17, 2019

  • Verified passed on iPad 5th Gen (iOS 12.3.1) running 1.10 (19.07.16.23)
    • Verified STR from Brave Doesn't Auto-Switch to Tab #698 (comment)
    • Verified using several apps (Twitter, Slack, etc) that when Brave was not running in the background/memory, and I attempted to open a link from selected app, Brave opened and retained all tabs from previous session. New tab was opened with the expected link in focus.
    • Verified with same apps that when Brave was running in the background/memory, and I attempted to open a link from the selected app, Brave opened and retained all tabs from previous session. New tab was opened with the expected link in focus.
  • Verification PASSED on iPhone 6s+ running iOS 12.3.1 using 1.10 (19.07.16.23)
    • Verified STR from description
    • Verified using several apps (Twitter, Slack, etc) that when Brave was not running in the background/memory, and I attempted to open a link from selected app, Brave opened and retained all tabs from previous session. New tab was opened with the expected link in focus.
    • Verified with same apps that when Brave was running in the background/memory, and I attempted to open a link from the selected app, Brave opened and retained all tabs from previous session. New tab was opened with the expected link in focus.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants