[Bug] Fenix doesn't remember what tab was open
Steps to reproduce
- Open tab
- Press home
- Press recent apps button
- Swipe Fenix away
- Reopen Fenix
Expected behavior
- Fenix reopens on the same tab that was open
Actual behavior
- List of tabs appear
Device information
- Android device: Samsung S10e
- Fenix version: Latest from playstore
Works in: Fennec, Chrome
┆Issue is synchronized with this Jira Task
Similar to #1366
@lime124 please confirm that this is expected behaviour. Upon closing and restarting Fenix, the most recent tab is still selected and showing at the top and we should probably keep it this way and user test it at a later point.
When you open a tab, go to Fenix start screen, close the app, and re-open it again, you see the Fenix start screen. When you have a tab open, close the app, re-open it again, you should see the tab. We'll show what someone saw before closing the app/switching to another app.
Thanks @topotropic. Are you confirming that the current behaviour is correct?
@vesta0 No, the current behavior is: open a tab, close app, open app, you see the start screen instead of the tab
@topotropic when someone closes the app (instead of minimize) would it make sense to assume that they are done with their task and therefore they would expect their open tab to be minimized when they come back to the browser? I remember reading about how users don't like that most browsers try to reload the last visited page every time they open the browser. I can find the article and send you. Let me know what you think :)
@vesta0 sure, I don't have a strong opinion here, let's leave as is and track it as hypothesis
Android does not provide a way to tell the difference between a user swiping an app closed and the app being killed in the background.
Yes, that's why it's really confusing. If the system is under memory pressure (common on low end devices) Android will kill Fenix in the background and lose the page state.
@vesta0 Don't we have some telemetry data on how many Fennec users customise the "Restore tabs on startup" option in Fennec as compared to other options from our settings?
@kbrosnan The presence or not of any savedInstanceState can be taken as a hint, even if it might not be 100% reliable, and without having looked at the code, I guess that could actually be the reason behind the current behaviour (coupled with the fact the the home/tabs view has been declared the "root" view, so in the absence of any saved instance state that is what gets opened by default?).
@buttercookie42 that would have been helpful but we don't track this in Fennec.
@kbrosnan thanks for the additional detail. What is your recommendation here?
@buttercookie42 that would have been helpful but we don't track this in Fennec.
Hmm, what happens to this data, then?
I'm not using Fenix on a daily basis mainly bc of this issue.
Can't understand how opening a list of "open tabs" could be more useful than showing the user it last opened page. @vesta0 mentioned an study about users complaining about this behavior but it's how "Restore previous session" works in every browser I used:

@topotropic and I have agreed that the current behaviour is indeed correct.
In fact, we would revise it slightly:
- Open tab
- Press home
- Press recent apps button
- Swipe Fenix away
- Reopen Fenix
about:homeappear
The tab you previously had opened can be accessed by:
- Press tab tray icon (it will show a number in it)
- Select the tab you want to go to
This supports what we learnt from our user study, quoting our researcher Elisabeth:
[…] a new tab would work because no one had any trouble seeing the tab tray icon or switching to that view in those most recent tests, as long as they had the reassurance of the number in the tab icon
@santiagofn Your preference is still totally correct! Some – not all – test participants preferred last opened tabs to always open after quit.
Quoting Elisabeth:
[…] people who are big fans of keeping specific tabs open like to return to where they left off, but it also didn't seem to be a major barrier if they landed back on the Fennec home screen […]
So we recommend, both:
- Keep our current behaviour: always open
about:home - At the same time, track this behaviour as a hypothesis. See whether a significant percentage of users, after reopening Firefox, consistently go to the last opened tab.
“Always open last tab after quit” may make it as a feature in the future. For now, we recommend working on other things while waiting and seeing the result of this behaviour.
Let's take a look at the telemetry after migration to see what people are doing on the homescreen to validate/invalidate the hypothesis.
At the same time, track this behaviour as a hypothesis. See whether a significant percentage of users, after reopening Firefox, consistently go to the last opened tab.
We can also continue to monitor via milestone tests.
Is this part of the Tabs Tray work, @topotropic ? If this isn't relevant anymore, maybe we could close it and handle it in a more recent issue.
Yes, I'll close it and keep track of the qual + quan research to monitor this