brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.85k stars 2.34k forks source link

Blank tab is opened when opening links in external apps #41050

Open Uni-verse opened 1 month ago

Uni-verse commented 1 month ago

Description

Blank tab is opened when opening links in external apps

Steps to reproduce

  1. New install
  2. Open product review article or youtube product review video with retail links
  3. Click on the links to open in external app
  4. Return to Brave app, check tab view

Actual result

Blank tab is opened

https://github.com/user-attachments/assets/342bc2f9-da89-470d-a997-7f27b6242ff5

Expected result

No blank tab

Reproduces how often

Easily reproduced

Brave version

1.69 - Reproducible 1.68 - Reproducible

Device/iOS version

iPhone / iOS 17

Affected browser versions

Reproducibility

Miscellaneous information

No response

kylehickinson commented 1 month ago

Investigated and this happens in Chrome iOS as well so it will not be fixed by Chromium web views. There also isn't a good spot to fix this problem in general as we aren't notified in any real way that WKWebView launched an external app based on a URL load so we'd need to consider alternative solutions to fix this if we actually want to. Given that Chrome iOS doesn't fix this I don't know if we should either

jamesmudgett commented 1 month ago

@stoletheminerals thoughts on auto-closing about:blank tab if it's the current tab when refocusing the app?

stoletheminerals commented 1 month ago

@jamesmudgett yeah, we can do that