mirror of
https://ark.sudovanilla.org/Korbs/electron-tabs.git
synced 2024-12-23 03:53:53 +00:00
Fix previous tab not activated on close
This commit is contained in:
parent
b57253c82f
commit
7dd4b2aa98
2
index.js
2
index.js
|
@ -223,10 +223,10 @@ class Tab extends EventEmitter {
|
||||||
let tabGroup = this.tabGroup;
|
let tabGroup = this.tabGroup;
|
||||||
tabGroup.tabContainer.removeChild(this.tab);
|
tabGroup.tabContainer.removeChild(this.tab);
|
||||||
tabGroup.viewContainer.removeChild(this.webview);
|
tabGroup.viewContainer.removeChild(this.webview);
|
||||||
|
let activeTab = this.tabGroup.getActiveTab();
|
||||||
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) {
|
if (activeTab.id === this.id) {
|
||||||
TabGroupPrivate.activateRecentTab.bind(tabGroup)();
|
TabGroupPrivate.activateRecentTab.bind(tabGroup)();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue