Bug 1578131 - (Multi-select tabs) Close window directly instead of removing tabs one by one when all tabs are selected and 'closeWindowWithLastTab' pref enabled. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D58699
This commit is contained in:
@@ -3328,6 +3328,16 @@
|
||||
},
|
||||
|
||||
removeTabs(tabs) {
|
||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||
// can be considered equivalent to closing the window.
|
||||
if (
|
||||
this.tabs.length == tabs.length &&
|
||||
Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab")
|
||||
) {
|
||||
window.closeWindow(true, window.warnAboutClosingWindow);
|
||||
return;
|
||||
}
|
||||
|
||||
this._clearMultiSelectionLocked = true;
|
||||
|
||||
// Guarantee that _clearMultiSelectionLocked lock gets released.
|
||||
|
||||
Reference in New Issue
Block a user