Closed Bug 786982 Opened 10 years ago Closed 10 years ago

The user should be able to close the last remaining tab


(Firefox for Android Graveyard :: General, defect)

Not set


(firefox19 verified, firefox20 verified)

Firefox 19
Tracking Status
firefox19 --- verified
firefox20 --- verified


(Reporter: paul, Unassigned)




(3 files)

As a user, I'm frustrated to not be able to get rid of the last tab.

Let's imagine I want to look for a ring for my fiancé. Once my browsing session is done, I want to close the last tab that shows a big fat embarrassing ring. The only way I can do that is to load a new random page.

Closing the last page could load about:home. Or maybe go to a tab-less browser.
> Or maybe go to a tab-less browser.

This is what Chrome does. I think this is the best way to do it but loading a home page would also be ok.
Duplicate of this bug: 802304
Attached patch Patch: Option 1Splinter Review
This patch closes the last tab and opens about:home.
We loadUrl() about:home, when we know we are about to close the last tab.

If the only tab remaining is about:home, we close it and open it again.
Do we want this behavior? Or block the ability to close the tab when the only present tab is about:home?
Attachment #678476 - Flags: review?(mark.finkle)
Attached patch Patch: Option 2Splinter Review
I somehow feel this to be better. We don't close "about:home" tab in this case.
Attachment #678490 - Flags: review?(mark.finkle)
Attachment #678476 - Attachment description: Patch → Patch: Option 1
Part of the reason people want to be able to close the last tab is to remove all session history in the tab (back/forward session). If we don't realy close the last tab if it's about:home, then people could use BACK to go back to the previous webpage in the tab. We do not want to allow that to happen.

Therefore, I will r- the "Option 2" patch and review the "Option 1" patch
Comment on attachment 678490 [details] [diff] [review]
Patch: Option 2

This does not remove the session history, so it's not the best option.
Attachment #678490 - Flags: review?(mark.finkle) → review-
Comment on attachment 678476 [details] [diff] [review]
Patch: Option 1

This looks OK to me. We might want to tweak this by avoiding any unneeded animations, if we can help it. That can be a new bug though.
Attachment #678476 - Flags: review?(mark.finkle) → review+
Comment on attachment 678476 [details] [diff] [review]
Patch: Option 1

Review of attachment 678476 [details] [diff] [review]:

You're removing a bit too much code for the close button handling. We hide the close button while swiping, this code should be kept.
Attachment #678476 - Flags: review-
I would like the "close and reopen" behaviour more, because its visible feedback "the browser was empty, now everything is in a new session".

Even better would be some "empty browser" behaviour, maybe with an additional option to open about:blank instead of about:home
Pushed with r+ from mfinkle:

I don't get any mail notification for the other r-. I'll add as a followup.
Whiteboard: [leave open]
This patch adds back the close button code for animation.
Attachment #678820 - Flags: review?(
Comment on attachment 678820 [details] [diff] [review]
Patch: Make close button invisible

Review of attachment 678820 [details] [diff] [review]:

Nice, thanks.
Attachment #678820 - Flags: review?( → review+
One comment on today's Nightly: Closing the last tab should probably close the tabs tray as well. It feels awkward switching to about:home, but still leaving the tray open.
Filed follow up bug 811738 for what I just said :)

As you were.
(In reply to Brian Nicholson (:bnicholson) from comment #17)

If this part does not make the merge, we should track it for uplift
Depends on: 814148
Depends on: 814165
Depends on: 811738
Sriram, the second part of this didn't make Fx19 - see comment 18.
Closed: 10 years ago
Flags: needinfo?(sriram)
Resolution: --- → FIXED
Whiteboard: [leave open]
Target Milestone: --- → Firefox 19
Aah! You caught me!
Flags: needinfo?(sriram)
Comment on attachment 678820 [details] [diff] [review]
Patch: Make close button invisible

[Approval Request Comment]
Bug caused by (feature/regressing bug #): --
User impact if declined: Close button will be animating.
Testing completed (on m-c, etc.): Landed in m-c on 11/20
Risk to taking this patch (and alternatives if risky): Very low.
String or UUID changes made by this patch: None.
Attachment #678820 - Flags: approval-mozilla-aurora?
Comment on attachment 678820 [details] [diff] [review]
Patch: Make close button invisible

low risk, aurora approved.
Attachment #678820 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
The last tab can be closed both on the latest Aurora and Nightly builds. Closing bug as verified fixed on:

Firefox 20.0a1 (2012-12-06)
Device: Galaxy Tab2 7"
OS: Android 4.0.3
TCs added in Moztrap with new option for following versions: 19, 19 tablets, 20 , 20 tablets - Close the last remaining tab - Closing last tab will open about:home
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.