Move to new window should show hidden tabs as well - issue #257
This commit is contained in:
parent
c81851e3bd
commit
4ec371df6c
1 changed files with 14 additions and 1 deletions
15
index.js
15
index.js
|
@ -684,6 +684,11 @@ const ContainerService = {
|
|||
return;
|
||||
}
|
||||
|
||||
this._remapTabsIfMissing(args.userContextId);
|
||||
if (!this._isKnownContainer(args.userContextId)) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
this.sendTelemetryPayload({
|
||||
"event": "move-tabs-to-window",
|
||||
"userContextId": args.userContextId,
|
||||
|
@ -697,7 +702,8 @@ const ContainerService = {
|
|||
});
|
||||
|
||||
// Nothing to do
|
||||
if (list.length === 0) {
|
||||
if (list.length === 0 &&
|
||||
this._identitiesState[args.userContextId].hiddenTabs.length === 0) {
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
|
@ -713,6 +719,13 @@ const ContainerService = {
|
|||
newBrowserWindow.gBrowser.adoptTab(viewFor(tab), pos++, false);
|
||||
}
|
||||
|
||||
// Let's show the hidden tabs.
|
||||
for (let object of this._identitiesState[args.userContextId].hiddenTabs) { // eslint-disable-line prefer-const
|
||||
newBrowserWindow.gBrowser.addTab(object.url || DEFAULT_TAB, { userContextId: args.userContextId });
|
||||
}
|
||||
|
||||
this._identitiesState[args.userContextId].hiddenTabs = [];
|
||||
|
||||
// Let's close all the normal tab in the new window. In theory it
|
||||
// should be only the first tab, but maybe there are addons doing
|
||||
// crazy stuff.
|
||||
|
|
Loading…
Add table
Reference in a new issue