Merge pull request #121 from bakulf/move
Fix the moving of tabs in nightly
This commit is contained in:
@@ -384,16 +384,11 @@ const ContainerService = {
|
|||||||
url: "about:blank",
|
url: "about:blank",
|
||||||
onOpen: window => {
|
onOpen: window => {
|
||||||
const newBrowserWindow = viewFor(window);
|
const newBrowserWindow = viewFor(window);
|
||||||
|
let pos = 0;
|
||||||
|
|
||||||
// Let's move the tab to the new window.
|
// Let's move the tab to the new window.
|
||||||
for (let tab of list) { // eslint-disable-line prefer-const
|
for (let tab of list) { // eslint-disable-line prefer-const
|
||||||
const newTab = newBrowserWindow.gBrowser.addTab("about:blank");
|
newBrowserWindow.gBrowser.adoptTab(viewFor(tab), pos++, false);
|
||||||
newBrowserWindow.gBrowser.swapBrowsersAndCloseOther(newTab, viewFor(tab));
|
|
||||||
// swapBrowsersAndCloseOther is an internal method of gBrowser
|
|
||||||
// an it's not supported by addon SDK. This means that we
|
|
||||||
// don't receive an 'open' event, but only the 'close' one.
|
|
||||||
// We have to force a +1 in our tab counter.
|
|
||||||
++this._identitiesState[args.userContextId].openTabs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let's close all the normal tab in the new window. In theory it
|
// Let's close all the normal tab in the new window. In theory it
|
||||||
|
|||||||
Reference in New Issue
Block a user