Last Comment Bug 646609 - Always enable Close Tab in the tab context menu
: Always enable Close Tab in the tab context menu
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All All
: -- minor (vote)
: seamonkey2.1b3
Assigned To: Jens Hatlak (:InvisibleSmiley)
:
:
Mentors:
Depends on: 533125
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-30 13:42 PDT by Jens Hatlak (:InvisibleSmiley)
Modified: 2011-04-03 19:32 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (3.51 KB, patch)
2011-03-30 13:42 PDT, Jens Hatlak (:InvisibleSmiley)
no flags Details | Diff | Splinter Review
always enable Close Tab [Checkin: comment 6] (1.72 KB, patch)
2011-03-31 14:39 PDT, Jens Hatlak (:InvisibleSmiley)
neil: review+
Details | Diff | Splinter Review

Description Jens Hatlak (:InvisibleSmiley) 2011-03-30 13:42:11 PDT
Created attachment 523098 [details] [diff] [review]
patch

Bug 533125 added support for browser.tabs.closeWindowWithLastTab and took care about the menuitem under File (cf. navigator.js). What's missing is middle clicking and the tab context menu, which still disables Close Tab if the pref is set to false.
Comment 1 neil@parkwaycc.co.uk 2011-03-30 16:45:53 PDT
(In reply to comment #0)
> Bug 533125 added support for browser.tabs.closeWindowWithLastTab and took care
> about the menuitem under File (cf. navigator.js). What's missing is middle
> clicking and the tab context menu, which still disables Close Tab if the pref
> is set to false.
The tab close button always closes the tab, never the window, irrespective of the pref, and I think that middle-clicking should have the same behaviour. I agree that disabling close tab on the context menu is wrong, but as yet I'm not convinced that we actually need to disable it at all.
Comment 2 Jens Hatlak (:InvisibleSmiley) 2011-03-31 09:25:48 PDT
(In reply to comment #1)
> The tab close button always closes the tab, never the window, irrespective of
> the pref, and I think that middle-clicking should have the same behaviour.

OK, valid point. Didn't think of the tab bar close button; it's just too far away to be useful to me so I tend to forget about its existence. ;-)

> I agree that disabling close tab on the context menu is wrong, but as yet I'm
> not convinced that we actually need to disable it at all.

I think we do because otherwise people may accidentally close the whole application (in case only a browser window is open) while expecting to close just the tab. Basically one of these cases that might become a trap for non-power users. [The alternative would be to rename the context menu item in that case but I don't like that idea.]
Comment 3 neil@parkwaycc.co.uk 2011-03-31 13:30:25 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > I agree that disabling close tab on the context menu is wrong, but as yet I'm
> > not convinced that we actually need to disable it at all.
> I think we do because otherwise people may accidentally close the whole
> application (in case only a browser window is open) while expecting to close
> just the tab.
The close tab context menuitem would never do that; like the close button it only knows how to close tabs.
Comment 4 Jens Hatlak (:InvisibleSmiley) 2011-03-31 14:39:59 PDT
Created attachment 523426 [details] [diff] [review]
always enable Close Tab [Checkin: comment 6]

Well, then: one-liner.
Comment 5 neil@parkwaycc.co.uk 2011-03-31 15:37:22 PDT
Comment on attachment 523426 [details] [diff] [review]
always enable Close Tab [Checkin: comment 6]

BTW Ctrl+F4 also always works if the tab bar is visible.
Comment 6 Jens Hatlak (:InvisibleSmiley) 2011-03-31 15:47:21 PDT
Comment on attachment 523426 [details] [diff] [review]
always enable Close Tab [Checkin: comment 6]

http://hg.mozilla.org/comm-central/rev/e1f6155dfa8d

Note You need to log in before you can comment on or make changes to this bug.