Back button sends user to the home screen after visiting a page |
||||
Issue descriptionChrome Version: 63.0.3239.111 OS: Android 7.1.1; PH-1 Build/NMJ51B Chrome Home (Hub) is manually enabled. What steps will reproduce the problem? (1) Open a new tab and go to https://news.ycombinator.com/item?id=16073022 (2) Click on the docs.google.com there (3) Go back What is the expected result? Tab closes and the user is brought to whatever the tab was active before. What happens instead? Chrome minimizes and user is sent to the home screen.
,
Jan 11 2018
@mariakhomenko -- looks like something wonky going on with external navigation delegate and the play store?
,
Jan 11 2018
@tedchoc, the play store is red herring in that video. The browser just goes to whatever's in the back stack. I don't generally think this is a bug. It's a feature request. The docs URL from ycombinator is opened in a new tab. Our back press logic first tries to move back in-tab navigation (there's none since it's a new tab) and then it just does the Android app "back" which brings us back to home screen. I think we already keep track of parent tab ids, so we could in theory close the tab and bring the launcher tab to foreground, but it's not something that's been implemented.
,
Jan 11 2018
The last bit is what we normally do. If you long press "open in background" a tab, switch to that tab and hit back, you're brought back to the parent tab. The same happens if you go to a site (news.google.com in desktop mode) that opens links in new tabs. Click on a link, you're switched to a new tab, back brings you back to the parent tab. To me, something is broken in this chain to sever the parent tab relationship.
,
Jan 11 2018
Yup, the back button works differently (tab closes, you stay in Chrome) if you click on any other link on that page (e.g. on the username).
,
Jan 11 2018
Ah, I missed the launch type check code in handleBackPressed. I'll take a closer look.
,
Jan 12 2018
Ok, so here's what's happening. The URL on the page is a docs URL, so it gets dispatched to docs app, assuming it's installed. The doc app for whatever reason decides to display the URL in the browser and in turn sends a VIEW intent with the same URL to Chrome. Since that's just an incoming intent into Chrome there is no link between the originating tab and the new opened tab. Hitting back takes us to homescreen since docs is finished. This scenario actually looks better with Herb enabled because then Docs opens an herb and hitting back will move back in the stack to Chrome. There's nothing to do here because we cannot control what happens to a URL we send to docs and it should generally be something we hit rarely.
,
Jan 17 2018
I agree this is a won't fix. I think we could likely special case this by retaining the parent tab ID if we don't get an onStop call (since we'd be remaining visible to the user and likely associated with the original tab), but I feel that is more code for a use case that is so bespoke that is likely to cause more code confusion that it is worth. |
||||
►
Sign in to add a comment |
||||
Comment 1 by sandeepkumars@chromium.org
, Jan 11 2018Labels: Needs-triage-Mobile Triaged-Mobile M-65