Closed Bug 128631 Opened 23 years ago Closed 15 years ago

Right click menu selection for Close Tab does not work on a single tab

Categories

(SeaMonkey :: Tabbed Browser, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jaimejr, Unassigned)

References

Details

Attachments

(1 file, 3 obsolete files)

Build ID: 2001-03-01-03-trunk Reproducible: Always Steps: 1. Launch the browser 2. Add a new tab 3. Right click and select to remove the new tab 4. One tab is still remianing 5. Right click and select to remove the remaining single tab Results: Remaining tab can not be removed (i.e. Closed) Note: Mozilla should either close the remaning tab, when only one tab is remaining, or allow the user to close the last tab, as the tab UI occupies almost the same amount of browser UI as 2 toolbars
Nominating for nsbeta1, because I want the pixels back in the browser window.
Keywords: nsbeta1, nsCatFood
What should a window with no open tabs look like? Just the chrome but no content? Or if you mean the tab _bar_ should be hidden and not the tab itself, go to Edit -> Preferences -> Navigator -> Tabbed browsing -> Tab Display -> Hide the tab bar when only one tab is open.
Blocks: 128632
agreed ... "Hide the tab bar when only one tab is open.", is a better statement of the problem I discovered. Changing Summary to reflect the better stated request. Thanks for the assist.
Summary: Can't close a single tab → Hide the tab bar when only one tab is open
Maybe I wasn't too clear, but I was talking about a pref that does already exist. I think you might have been tyring to report bug 112699, which says that changing the pref does not take effect immediately. Or else you might have meant bug 109651, that the X button does nothing with only one tab open.
Ah, I think mine report is similar to both those reports, but still different. In my case, I am I am using context menu to Close Tab on the last remaining tab in the browser. The selection says *Close Tab*, so I assume it should close (i.e. hide the tab).
Summary: Hide the tab bar when only one tab is open → Right click menu selection for Close Tab does not work on a single tab
Bug 112695 - when there's only one tab, some context menu items should be disabled or removed
Yeah, that would be related, if not a dupe, but I think that request, ask for the menu items to be removed. This bug, would request to make those menu, or at least this one selection, function as expected.
What is the expected behavior if you have the "Hide tab bar when only one tab is open" pref off and you choose Close Tab on the only open tab?
IMHO, when a user selects a menu item, s/he believes that an action should occur. In this case, by selecting "Close Tab", as a user I would expect the tab to be closed. Much like, when I select "Reload Tab", it reloads the tab. Now, the fact that changing the pref to ON for "Hide tab bar when only one tab is open" does not take into affect *immediately* (bug 112699), only serves to compound the problem, because there is no way for the user to correct the problem, and the user now has experienced 2 instances where their desire hide tab bar, resulted in nothing happening. Filed bug 128706 [RFE] Hide tab bar when only one tab Pref should be on by default to determine what the state of the PREF should be by default, and bug 128708 [RFE] When making a selection to "Close Tab" on the single remaining Tab the "Hide tab bar when only one tab" Pref should be change to ON.
Instead of disabling the close button and the "Close Tab" (context) menu items, we could hide the tab strip for just this window (instead of changing the pref). I discussed this solution with Marlon and he and I agree that that would be rather strange and shouldn't be done (Marlon: but please correct me if I recall this incorreclty). The tab strip doesn't show by default for one tab (if it does, that's a regression that needs to be fixed), it should show/hide in currently open windows when changing the pref (patch exists, will get checked in soon I hope), and the button and menu items should get disabled (I believe the button got plussed, the menu items minused however) if the pref to hide the strip is off and there's only one tab. This should address the concerns you have.
If it were possible to close the tab yet leave the window intact (with empty tab bar), then that might be an acceptable solution, IMO, as long as there were no wierd repurcussions (e.g., drag & drop failures). A more likely possiblity is that on Close Tab we close the window instead. This may seem odd for the context menu or when clicking the tab bar 'X' icon, but we already change Ctrl-W from Close Tab to Close Window when there is only one tab in the window, so doing the same for these other ways to close tab would just increase consistency. ADT triage team did not consider the active yet unresponsive close tab affordances to be worth fixing, and I'd hate to lose the Ctrl-W mapping to Close window in this case as part of disabling close tab elsewhere. When I close the last content area in a window, I am all through with that window.
nsbeta1- per Nav triage team, ->1.2
Keywords: nsbeta1nsbeta1-
Target Milestone: --- → mozilla1.2
Close Tab (the last one) should set the tabstrip visibility to 'false' and load a blank page. After this, you're ready to go on or to close the whole browser window. Who says I want to end the session after closing the last tab? I've implemented this a long time ago in MultiZilla because of the demand for it. A lot of people surf to pron pages and they like to close the last tab also, if someone sneaks into their room or office. This btw also counts for the missing menuitem 'Close All Tabs', because there's no way to close all tabs at once. I can make a patch for mozilla if you like, just ask for it.
Attached patch diff -u (obsolete) — Splinter Review
Don't ask, here it is!
Attached patch diff -u (obsolete) — Splinter Review
Ah, I took the wrong file. 1.Removed: xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 2.Removed: extra } in <method name="removeAllTabs"> 3.Changed: this.mCurrentBrowser.loadURIWithFlags(about:blank); into: this.mCurrentBrowser.loadURIWithFlags('about:blank');
Attachment #82353 - Attachment is obsolete: true
Attached patch diff -u (obsolete) — Splinter Review
<Dr_P> fix indentation in your for loop <HJ> Dr_P: done
Attachment #82356 - Attachment is obsolete: true
Severity: major → enhancement
Keywords: patch
Severity: enhancement → major
Comment on attachment 82358 [details] [diff] [review] diff -u r=morten@nilsen.com I will test this patch when my tree is behaving again.
Attachment #82358 - Flags: review+
My new patch will respect the pref setting "browser.tabs.autoHide" and some of the lines in tabbrowser.xml will be simplified. Any other suggestions?
Attachment #82358 - Attachment is obsolete: true
Comment on attachment 82400 [details] [diff] [review] respect browser.tabs.autoHide and small code changes looks good... r=morten@nilsen.com
Attachment #82400 - Flags: review+
This bug has already been addressed in bug 150099. All that needs to be done now is to link the Close from the context menu to the code introduced by Jag. (It would be wrong / inconsistent to have the context Close behave differently from the tab close button.) CCing Jag.
<red faced> Colour me stupid. My apologies for not noticing Jag was already the assignee. Any public chastisement coming my way is my due.
Well, if we implement this, we'll have to change the text from close to hide tab bar. Btw, ctrl+w currently closes the window for the last tab, while the close box hides the tab bar. Which one should the context menu item be consistent with? Note that the menu item is currently disabled for the last tab, which IMO is just fine.
Severity: major → normal
Target Milestone: mozilla1.2alpha → Future
Currently: Window closes with: Ctrl-W, File -> Close Tab. Tab bar hides with: Tab bar close. Nothing (inactive): Context menu close. As I've stated here, and elsewhere, I think that all "close" methods should do the same thing. Having some UI elements behave differently than others is just confusing.
QA Contact: sairuh → pmac
I tested in both Firefox and Mozilla and this bug appears fixed. It appears when you have only 1 page open, no tab bar appears. When you open a new tab, then close it, the tabbar disappears. You can only have two tabs at a time, not one. Comment #21 suggests that the issue first mentioned in this bug is no longer an issue. Last comment in 2002. -> WORKSFORME
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
> You can only have two tabs at a time, not one. Not at all true. I've had one tab open all the time ever since tabs were introduced. Preferenced -> Tabbed Browsing -> Hide the tab bar when only one tab is open. To reproduce this bug, just uncheck that box. Reopening.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Wouldn't the tab bar always being visible be the expected behavior then if you unchecked that preference? If you closed the last page, then there would be no page loaded in the browser at all (not even about:blank). Do you want the home page to be opened when you close the last document? Otherwise, you'd have a browser window with no document at all.
> Do you want the home page to be opened when you > close the last document? I have no idea. See comment 24. Currently almost every UI method of closing the last tab results in different behaviour. There's no consistency here at all. This bug is, AFAIK, to resolve some of the inconsistency, by allowing the context menu click on a single tab to do the same thing as one of the other methods. To summarize, context menu close tab should do the same thing as Ctrl-W / File -> Close Tab, which should do the same thing as tab bar close button. Currently, they all do something different - which is terrible UI. (If we are to leave the context menu greyed out and disabled, then we should also disallow Ctrl-W, grey out and disallow File -> Close Tab, and grey out and disallow the tab bar close button.)
FWIW: My *personal* opinion is that when you only have a single tab, everything should be greyed out / disallowed. (Suggesting opening the home page opens up a huge can of worms when you consider that tab groups can be set as the home page. Would you really want to accidentally close the last tab only to have 5 more (if you have 5 tabs in your group) open up?) Having the tab bar simply close is, IMO, the wrong thing. (See bug 156082.) However, that's all just my *personal* opinion, and I don't want to debate it here. Somebody in charge of the UI should make a definitive decision as to what should happen - and then apply that decisons to ALL methods of closing the last tab across the board.
I agree it should be greyed out.
is this not a dupe of bug 154335?
Severity: normal → trivial
OS: Windows 98 → All
Hardware: PC → All
> is this not a dupe of bug 154335? No. This bug was originally (and shouldn't be morphed from that) about the context (right-click) menu of the last remaining tab open. Bug 154335 was about the close tab button. They are different UI elements and, still, exhibit different behaviour.
Product: Core → SeaMonkey
Assignee: jag → nobody
Status: REOPENED → NEW
QA Contact: pmac → tabbed-browser
Target Milestone: Future → ---
Fixed. Context menu items are now greyed out.
Status: NEW → RESOLVED
Closed: 21 years ago15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: