mirror of
https://ark.sudovanilla.org/Korbs/electron-tabs.git
synced 2024-12-23 03:53:53 +00:00
Prevent closing tab when closable is set to false
This commit is contained in:
parent
fd69f6bbe5
commit
4b2a2476ea
3
index.js
3
index.js
|
@ -189,7 +189,8 @@ class Tab {
|
||||||
// TODO: move
|
// TODO: move
|
||||||
}
|
}
|
||||||
|
|
||||||
close () {
|
close (force) {
|
||||||
|
if (!this.closable && !force) return;
|
||||||
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);
|
||||||
|
|
Loading…
Reference in a new issue