-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
🐛 Bug Report
Environment
Expo CLI 3.0.10 environment info:
System:
OS: macOS 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.6.0 - ~/.nvm/versions/node/v12.6.0/bin/node
Yarn: 1.16.0 - ~/.yarn/bin/yarn
npm: 6.10.1 - ~/.nvm/versions/node/v12.6.0/bin/npm
IDEs:
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmGlobalPackages:
expo-cli: 3.0.10
App target is both iOS and Android apps using Expo SDK 34.
Steps to Reproduce
On PR #4882 , there was a code change that made Custom Tabs opened in Android no longer show up in the device history.
https://github.com/expo/expo/pull/4882/files#diff-181a67a85ff6d2497b2ab4301faf3769R133-R134
That means when we call an external link in our app (on *Android devices), and the user briefly leaves the view, it closes on them.
Scenario 1:
-
The user clicks the menu item which makes a
openBrowserAsync
call to a url. -
The user views their task list.
-
The chrome custom tab dismisses itself without me tapping on anything.
Scenario 2:
-
The user clicks the menu item which makes a
openBrowserAsync
call to a url. -
The user navigates home on their device.
-
The chrome custom tab dismisses itself in the background and the user cannot return to it.
Expected Behavior
I am expecting the custom chrome tab to persist if I leave the app and return. Just like how it behaves on our iOS app.
If the user leaves the app to check on something else, we shouldn't close their session in case they were in the middle of finishing something up.
Actual Behavior
The custom chrome tab is closed immediately when the app is put in the background/loses focus.
Reproducible Demo
https://snack.expo.io/@kylegfs/call-openbrowserasync
In the demo, tap purple the button.
On Android, if you leave the app (by going home, or viewing the other opened apps), the web browser goes away (bad!).
On iOS, if you leave the app, the web browser stays (good!).