зеркало из https://github.com/mozilla/gecko-dev.git
Bug 996632 - Close tab' option from the tab context menu should be active for the last tab. r=dao
This commit is contained in:
Родитель
4a4d624b6a
Коммит
19d6141301
|
@ -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;
|
||||
|
|
|
@ -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});
|
||||
|
|
Загрузка…
Ссылка в новой задаче