Don't change active tab if closed tab wasn't active

This commit is contained in:
Thomas Brouard 2016-11-01 16:09:43 +01:00
parent f6664f50d3
commit 31244686fe

View file

@ -222,8 +222,12 @@ class Tab extends EventEmitter {
tabGroup.viewContainer.removeChild(this.webview); tabGroup.viewContainer.removeChild(this.webview);
TabGroupPrivate.removeTab.bind(tabGroup)(this, true); TabGroupPrivate.removeTab.bind(tabGroup)(this, true);
this.emit("close", this); this.emit("close", this);
let activeTab = this.tabGroup.getActiveTab();
if (activeTab.id === this.id) {
TabGroupPrivate.activateRecentTab.bind(tabGroup)(); TabGroupPrivate.activateRecentTab.bind(tabGroup)();
} }
}
} }
const TabPrivate = { const TabPrivate = {