Closed Bug 248987 Opened 20 years ago Closed 20 years ago

When closing last tab the tab bar disappears indefinitely until new tab is opened

Categories

(Firefox :: Tabbed Browser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: marinebane, Assigned: n0dalus+firefox)

References

Details

(Keywords: fixed-aviary1.0)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1

If option 'Hide tab bar when only one page is open' is disabled, the tab bar
should always be visible. When you close the last tab on it, instead of the
window closing, or ignoring your close request, it gets rid of the tab bar while
keeping your current page remaining. Restarting the program will show that the
tab bar is still gone until a new tab is opened.

Reproducible: Always
Steps to Reproduce:
1. Turn off 'Hide tab bar when only one page is open' option
2. Reload the browser
3. Open any page in the first tab
4. Close the current tab
5. Restart the program
Actual Results:  
The tab bar dissapeared completely. Restarting the program did not help. The
only way to bring it back was to open a new tab.

Expected Results:  
I would expect closing the last tab to either close the browser window, or
ignore your request to close it. In any case, the tab bar should not ever
dissapear when the 'Hide tab bar when only one page is open' option is disabled.

-
Related to bug 177506 and bug 253759.  What to do under various conditions when
the pref for 'Hide tab bar when only one page is open' is disabled?

Should the tab bar be able to be closed when 'Hide tab bar when only one page is
open' is disabled?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-aviary1.0PR?
*** Bug 255417 has been marked as a duplicate of this bug. ***
be good if we can get some help here. won't block PR for it since this has been
around for a while.
Flags: blocking-aviary1.0PR?
Flags: blocking-aviary1.0PR-
Flags: blocking-aviary1.0?
Keywords: helpwanted
fritz, another one if you get some cycles.
Assignee: bugs → fritz
My First Patch.
When there is only One tab remaining, it checks to see if the "Hide Tab bar
when only one website is open" option is FALSE, and if so, loads about:blank in
that tab and returns before hiding the tab bar.
Comment on attachment 159379 [details] [diff] [review]
Blanks Last Tab on Close instead of Hiding the Tab Bar if "Hide Tab Bar" option is unticked

I've been mulling over this for a while, whether we should hide/disable the
close tab UI, or blank the tab.  I think this is probably the best option,
since it gives an actual benefit to the user who does do it (and mistakes are
easily remedied with the back button).
Attachment #159379 - Flags: review+
Attachment #159379 - Flags: approval-aviary?
Keywords: helpwanted
Whiteboard: has-patch, has review, needs approval-aviary
Assignee: fritz → n0dalus
*** Bug 253759 has been marked as a duplicate of this bug. ***
Comment on attachment 159379 [details] [diff] [review]
Blanks Last Tab on Close instead of Hiding the Tab Bar if "Hide Tab Bar" option is unticked

a=asa for aviary checkin.
Attachment #159379 - Flags: approval-aviary? → approval-aviary+
Whiteboard: has-patch, has review, needs approval-aviary → has-patch, has review, needs checkin
Status: NEW → ASSIGNED
related (or dupe): bug 156082
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Whiteboard: has-patch, has review, needs checkin
Verified on Windows Firefox branch build 2004-09-27-08-0.9
Status: RESOLVED → VERIFIED
*** Bug 156082 has been marked as a duplicate of this bug. ***
Is there any way to disable this fix?  I'm not too happy with the way the back
button functions now and prefer to use the blanklast extension.
Flags: blocking-aviary1.0?
Summary: When closing last tab the tab bar dissapears indefinatly until new tab is opened → When closing last tab the tab bar disappears indefinitely until new tab is opened
(In reply to comment #12)
> Is there any way to disable this fix?  I'm not too happy with the way the back
> button functions now and prefer to use the blanklast extension.

What exactly is wrong with the back button functionality now?
(In reply to comment #13)
> (In reply to comment #12)
> > Is there any way to disable this fix?  I'm not too happy with the way the back
> > button functions now and prefer to use the blanklast extension.
> 
> What exactly is wrong with the back button functionality now?

How can I explain this?  When using the blanklast extension before this fix was
implemented; closing the last tab would blank it and give you a nice new shiny
tab with no history.  Now when closing a tab you get a blank tab but the back
button returns you to the page that was in the just closed tab (see comment #6).
  I can't really explain my dis-satisfaction with this behaviour.  Blanklast
won't function as before with this fix in.
This fix is only half-complete.  It functions properly when clicking the 'close
box' on the right side of the tabbar, but closes the browser when closing tabs
using Ctrl-W.

Should this be filed as a separate bug, or should this bug be reopened?

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040930, clean
profile, no extensions, only changing the "Hide tab bar" setting.

(I also agree with Comment #14 regarding clearing the tab history.)
no, don't reopen this bug.

There's some discussion regarding the proper function of Ctrl-W across
platforms, since in a lot of places it has been used as Close Window, but that's
outside of the context of this bug.

blanking the last tab isn't necessary, IMO, since its not a perf hit, and allows
a recovery option in case the tab closure wasn't intended.
(In reply to comment #16)

> blanking the last tab isn't necessary, IMO, since its not a perf hit, and allows
> a recovery option in case the tab closure wasn't intended.

I presume you mean clearing the tab history isn't necessary and I humbly
disagree.  I have been using nightlies with this for, what, 6 days now and it's
driving me nuts.  With "hide the tab bar.." deselected I can end up with one
single tab that can have an extensive history.  With tabbed browsing I (and I
imagine most users) close the current tab and open up a new site in the now
blank tab.  In a day's surfing, the history in this tab can become quite
extensive.  I submit that the blanklast extension did what this fix was intended
to accomplish admirably and that the fix wasn't really necessary (?).  Isn't
that the point of keeping FF lean and mean and letting extensions provide the
goodies?  A philosophical difference of opinions I s'pose; but I believe my
point is valid.
nothing in your response contradicts anything I said, it just iterates how you
browse.

The bug was that closing the last tab hides the tab bar, when its supposed to be
always visible.  While we could have just not hidden the bar, we decided to go
one step further and blank the current tab, without closing the window or making
it impossible to get back.  Either way, we needed _a_ fix for all users.  I'm
sure the blanklast extension can be modded to simply dump the history where we
don't.

Firefox is NOT about being a barebones browser that you need to tweak via
extensions.  Extensions should expand and modify the experience, but should
never be necessary for all users to use the browser properly.
*** Bug 233539 has been marked as a duplicate of this bug. ***
I think it is more consistent to blank the history when blanking the last tab.
The closing behaviour should be the same for all tabs, I see no reason for the
last tab to be different. No other tab gives you the ability to "undo" the close
by hitting Back. I believe there are valid reasons for wanting either of the
behaviours, but I think a blank history for closed tabs fits the UI more logically.

Either way, I'm really happy this issue has been fixed. I've been a long time
user of Blanklast and love being able to remove nit-pick extensions like that
from my list.
So how do I patch Firefox?
(In reply to comment #15)
> This fix is only half-complete.  It functions properly when clicking the 'close
> box' on the right side of the tabbar, but closes the browser when closing tabs
> using Ctrl-W.

That is bug 236721. 
Re comment 14:
> closing the last tab would blank it and give you a nice new shiny
> tab with no history.  Now when closing a tab you get a blank tab but the back
> button returns you to the page that was in the just closed tab

And comment 20:
> I think it is more consistent to blank the history when blanking the last tab.
> The closing behaviour should be the same for all tabs, I see no reason for the
> last tab to be different.
> No other tab gives you the ability to "undo" the close
> by hitting Back. I believe there are valid reasons for wanting either of the
> behaviours, but I think a blank history for closed tabs fits the UI more
logically.

Please see bug 236721 comment 21. I've included code that blanks the last tab's
history, because I agree with both of you that the current behaviour is
inconsistent in this regard.
I find Firefox's behavior counterintuitive;  why should clicking "close tab"
give me a new blank tab?  I would expect "close tab" (the contexual menu item,
the button, and the menu item) to be disabled if there's only one tab left.  Is
there any chance this behavior could be changed?
(In reply to comment #24)
> I find Firefox's behavior counterintuitive;  why should clicking "close tab"
> give me a new blank tab?  I would expect "close tab" (the contexual menu item,
> the button, and the menu item) to be disabled if there's only one tab left.  Is
> there any chance this behavior could be changed?

In most applications that have tabs, closing the last tab either quits the
application or leaves the application with no tabs open. Since it's not really
useful (or even possible afaik) in Firefox/Mozilla to leave no tabs, closing the
last tab simply gives you a fresh tab to work with (and in essence closes
whatever you were last browsing.) Disabling 'close tab' with only one tab left
would be counter-intuitive in my opinion, since there's a tab there and you
should be able to get rid of it (or at least blank it.)

When I first wrote the patch for this bug, I was trying to fix the issue where
the tab bar disappeared when it shouldn't. I decided that blanking the tab would
be the most intuitive action that didn't result in an unexpected/accidental
close or data loss.

Given that different people have such different opinions about how the 'Close
Tab' function should act, I think this is something that should have an
accompanying preference/dialogue to give the user the option of either:
- Closing the Application
- Blanking the tab (and clear history?)
- Doing nothing (and disable/grey-out 'Close Tab' function)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: