mirror of
https://ark.sudovanilla.org/Korbs/electron-tabs.git
synced 2024-12-23 03:53:53 +00:00
Don't change active tab if closed tab wasn't active
This commit is contained in:
parent
f6664f50d3
commit
31244686fe
4
index.js
4
index.js
|
@ -222,9 +222,13 @@ 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 = {
|
||||||
initTab: function () {
|
initTab: function () {
|
||||||
|
|
Loading…
Reference in a new issue