From 19d6141301c322368a5e843f3c15edb6558a7cb6 Mon Sep 17 00:00:00 2001 From: Praveenkumar Date: Thu, 17 Apr 2014 03:26:00 +0200 Subject: [PATCH] Bug 996632 - Close tab' option from the tab context menu should be active for the last tab. r=dao --- browser/base/content/browser.js | 4 ---- browser/components/tabview/test/browser_tabview_bug625195.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 03909e33c554..6ac10a86b3fe 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -6999,10 +6999,6 @@ var TabContextMenu = { aPopupMenu.triggerNode : gBrowser.selectedTab; let disabled = gBrowser.tabs.length == 1; - // Enable the "Close Tab" menuitem when the window doesn't close with the last tab. - document.getElementById("context_closeTab").disabled = - disabled && gBrowser.tabContainer._closeWindowWithLastTab; - var menuItems = aPopupMenu.getElementsByAttribute("tbattr", "tabbrowser-multiple"); for (let menuItem of menuItems) menuItem.disabled = disabled; diff --git a/browser/components/tabview/test/browser_tabview_bug625195.js b/browser/components/tabview/test/browser_tabview_bug625195.js index 9c478b582c7c..6132987f9b5f 100644 --- a/browser/components/tabview/test/browser_tabview_bug625195.js +++ b/browser/components/tabview/test/browser_tabview_bug625195.js @@ -7,7 +7,7 @@ function test() { let originalTab = gBrowser.tabs[0]; popup(originalTab); - ok(document.getElementById("context_closeTab").disabled, "The 'Close tab' menu item is disabled"); + ok(!document.getElementById("context_closeTab").disabled, "The 'Close tab' menu item is enabled"); ok(document.getElementById("context_openTabInWindow").disabled, "The 'Move to New Window' menu item is disabled"); let newTabOne = gBrowser.addTab("about:blank", {skipAnimation: true});